|
|
|
@ -35,6 +35,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double |
|
|
|
using Properties; |
|
|
|
using Storage; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Globalization; |
|
|
|
using System.Linq; |
|
|
|
@ -99,7 +100,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double |
|
|
|
/// <summary>
|
|
|
|
/// Create a new dense vector as a copy of the given other vector.
|
|
|
|
/// This new vector will be independent from the other vector.
|
|
|
|
/// A new memory block will be allocated for storing the matrix.
|
|
|
|
/// A new memory block will be allocated for storing the vector.
|
|
|
|
/// </summary>
|
|
|
|
public DenseVector(Vector<double> other) |
|
|
|
: this(other.Count) |
|
|
|
@ -107,6 +108,16 @@ namespace MathNet.Numerics.LinearAlgebra.Double |
|
|
|
other.Storage.CopyToUnchecked(Storage, skipClearing: true); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Create a new dense vector as a copy of the given enumerable.
|
|
|
|
/// This new vector will be independent from the enumerable.
|
|
|
|
/// A new memory block will be allocated for storing the vector.
|
|
|
|
/// </summary>
|
|
|
|
public DenseVector(IEnumerable<double> other) |
|
|
|
: this(DenseVectorStorage<double>.FromEnumerable(other)) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Create a new dense vector directly binding to a raw array.
|
|
|
|
/// The array is used directly without copying.
|
|
|
|
|