Converts an array to a vector without copying.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static DenseVector<T> AsVector<T>(
this T[] values,
int length,
ArrayMutability mutability = ArrayMutability.Immutable
)
<ExtensionAttribute>
Public Shared Function AsVector(Of T) (
values As T(),
length As Integer,
Optional mutability As ArrayMutability = ArrayMutability.Immutable
) As DenseVector(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static DenseVector<T>^ AsVector(
array<T>^ values,
int length,
ArrayMutability mutability = ArrayMutability::Immutable
)
[<ExtensionAttribute>]
static member AsVector :
values : 'T[] *
length : int *
?mutability : ArrayMutability
(* Defaults:
let _mutability = defaultArg mutability ArrayMutability.Immutable
*)
-> DenseVector<'T>
Parameters
- values
- Type: T
An array. - length
- Type: SystemInt32
The length of the vector. - mutability (Optional)
- Type: Extreme.MathematicsArrayMutability
Specifies the mutability of the vector.
Type Parameters
- T
- The type of the elements of the array.
Return Value
Type:
DenseVectorTThe array
values converted to a vector.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Reference