IData Object<TObject>.As Vector<T> Method
Attempts to convert the object to a vector with the specified element type.
Definition
Namespace: Numerics.NET.Data
Assembly: Numerics.NET.Data (in Numerics.NET.Data.dll) Version: 4.0.3
C#
The new vector if successful; otherwise null.
Assembly: Numerics.NET.Data (in Numerics.NET.Data.dll) Version: 4.0.3
Vector<T> AsVector<T>(
bool strict = true
)
Parameters
- strict Boolean (Optional)
- Specifies whether the element type should be matched exactly (true), or whether conversions are allowed (false).
Type Parameters
- T
- The element type of the vector
Return Value
Vector<T>The new vector if successful; otherwise null.
Remarks
The conversion may fail for two reasons. Either the object is not a vector, matrix, or one-column data frame, or the element type of the vector cannot be cast to T.