Matrix.WrapLowerTriangular Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

WrapLowerTriangular<T>(Array2D<T>, Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)

Creates a new lower TriangularMatrix<T> by wrapping an existing Array2D<T> without copying.
C#
public static TriangularMatrix<T> WrapLowerTriangular<T>(
	Array2D<T> source,
	int rowCount,
	int columnCount,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
	MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  Array2D<T>
An Array2D<T> to wrap.
rowCount  Int32
The number of rows in the matrix.
columnCount  Int32
The number of columns in the matrix.
elementOrder  MatrixElementOrder  (Optional)
A MatrixElementOrder value that indicates whether the elements are stored in column-major or row-major order.
diagonal  MatrixDiagonal  (Optional)
Specifies whether the matrix has a unit diagonal.
mutability  ArrayMutability  (Optional)
Specifies how the matrix's values may be changed. The default is mutable values.

Type Parameters

T
The element type of the matrix.

Return Value

TriangularMatrix<T>
A new lower TriangularMatrix<T> that wraps the source storage.

Remarks

Changes to the matrix will affect the original storage, and vice versa.

Exceptions

ArgumentNullExceptionsource is null.

WrapLowerTriangular<T>(T[], Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)

Creates a new lower TriangularMatrix<T> by wrapping an existing one-dimensional array without copying.
C#
public static TriangularMatrix<T> WrapLowerTriangular<T>(
	T[] source,
	int rowCount,
	int columnCount,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
	MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  T[]
A one-dimensional array to wrap.
rowCount  Int32
The number of rows in the matrix.
columnCount  Int32
The number of columns in the matrix.
elementOrder  MatrixElementOrder  (Optional)
A MatrixElementOrder value that indicates whether the elements in source are stored in column-major or row-major order.
diagonal  MatrixDiagonal  (Optional)
Specifies whether the matrix has a unit diagonal.
mutability  ArrayMutability  (Optional)
Specifies how the matrix's values may be changed. The default is mutable values.

Type Parameters

T
The element type of the matrix.

Return Value

TriangularMatrix<T>
A new lower TriangularMatrix<T> that wraps the source array.

Remarks

Changes to the matrix will affect the original array, and vice versa.

Exceptions

ArgumentNullExceptionsource is null.

WrapLowerTriangular<T>(Memory2D<T>, Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)

Creates a new lower TriangularMatrix<T> by wrapping an existing Memory2D<T> without copying.
C#
public static TriangularMatrix<T> WrapLowerTriangular<T>(
	Memory2D<T> source,
	int rowCount,
	int columnCount,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
	MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  Memory2D<T>
A Memory2D<T> to wrap.
rowCount  Int32
The number of rows in the matrix.
columnCount  Int32
The number of columns in the matrix.
elementOrder  MatrixElementOrder  (Optional)
A MatrixElementOrder value that indicates whether the elements are stored in column-major or row-major order.
diagonal  MatrixDiagonal  (Optional)
Specifies whether the matrix has a unit diagonal.
mutability  ArrayMutability  (Optional)
Specifies how the matrix's values may be changed. The default is mutable values.

Type Parameters

T
The element type of the matrix.

Return Value

TriangularMatrix<T>
A new lower TriangularMatrix<T> that wraps the source storage.

Remarks

Changes to the matrix will affect the original storage, and vice versa.

See Also