Tensor<T>.AsMatrix Method

Returns the tensor as a matrix.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public abstract Matrix<T> AsMatrix(
	Intent intent = Intent.ReadOnlyView
)

Parameters

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

Return Value

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

Remarks

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

Exceptions

DimensionMismatchException

The tensor has more than two non-singleton dimensions.

See Also