Tensor<T>.AsVector Method

Returns the tensor as a vector.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
C#
public abstract Vector<T> AsVector(
	Intent intent = Intent.ReadOnlyView
)

Parameters

intent  Intent  (Optional)
An Intent value that specifies the intended use of the vector.

Return Value

Vector<T>
A reference to the new Vector<T>.

Remarks

The intent parameter can be used to choose the optimal representation of the vector for a specific purpose. Note that this method guararantees that the returned vector will be suitable for the specified purpose, but it will not enforce it. For example, if the purpose of the vector is ReadOnly, there is no guarantee that the returned vector will be read-only.

Exceptions

DimensionMismatchException

The tensor has more than one non-singleton dimension.

See Also