Matrix.CreateUpperTriangular<T>(Int32, Int32, T[], MatrixDiagonal, MatrixElementOrder, Boolean) Method

Constructs a new upper triangular matrix.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static TriangularMatrix<T> CreateUpperTriangular<T>(
	int rowCount,
	int columnCount,
	T[] values,
	MatrixDiagonal diagonal,
	MatrixElementOrder order,
	bool reuseComponentArray
)

Parameters

rowCount  Int32
The number of rows.
columnCount  Int32
The number of columns.
values  T[]
A T array that contains the elements.
diagonal  MatrixDiagonal
A MatrixDiagonal value that indicates whether the diagonal elements are all 1 or not.
order  MatrixElementOrder
A MatrixElementOrder value that indicates whether the elements are stored in column major or row major order.
reuseComponentArray  Boolean
If true, the array referenced by values is used directly. Any changes to the elements of this triangular matrix will also affect the original array. If false, the elements are copied from values to a new array.

Type Parameters

T

Return Value

TriangularMatrix<T>
A triangular matrix.

Remarks

The array values must contain the elements of the matrix, column by column. Only the values in the upper triangular part of this array are used. The other elements must be present, but they are never accessed.

Exceptions

ArgumentNullExceptionvalues is null.

See Also