Vector.Create From Memory Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Create | Constructs a new dense vector from a block of memory. |
Create | Constructs a new dense vector. |
CreateFromMemory<T>(Int32, Memory<T>, ArrayMutability, Boolean)
Constructs a new dense vector from a block of memory.
public static DenseVector<T> CreateFromMemory<T>(
int length,
Memory<T> values,
ArrayMutability mutability,
bool checkMissingValues = false
)
Parameters
- length Int32
- The length of the vector.
- values Memory<T>
- A strided structure containing the elements.
- mutability ArrayMutability
- Specifies how the vector's values may be changed.
- checkMissingValues Boolean (Optional)
- Optional. Specifies whether operations involving the vector should check for the presence of missing values. The default is false.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
CreateFromMemory<T>(Int32, Memory<T>, Int32, Int32, ArrayMutability, Boolean)
Constructs a new dense vector.
public static DenseVector<T> CreateFromMemory<T>(
int length,
Memory<T> values,
int offset,
int stride,
ArrayMutability mutability,
bool checkMissingValues = false
)
Parameters
- length Int32
- The length of the vector.
- values Memory<T>
- A memory block that contains the elements.
- offset Int32
- The offset of the first element of the vector in values.
- stride Int32
- The stride between successive elements of the vector.
- mutability ArrayMutability
- Specifies how the vector's values may be changed.
- checkMissingValues Boolean (Optional)
- Optional. Specifies whether operations involving the vector should check for the presence of missing values. The default is false.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Exceptions
Argument | values is null. |
Argument | length is less than zero. -or- The length of values is less than length. |