DenseMatrix<T>.ExtractUpperTriangle Method

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.5.0

Overload List

ExtractUpperTriangle(MatrixDiagonal) Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
Obsolete
ExtractUpperTriangle(Int32, Int32, MatrixDiagonal, Int32, Int32) Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
Obsolete

ExtractUpperTriangle(MatrixDiagonal)

Note: This API is now obsolete.
Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
C#
[ObsoleteAttribute("Use GetUpperTriangularView instead.")]
public TriangularMatrix<T> ExtractUpperTriangle(
	MatrixDiagonal unitDiagonal = MatrixDiagonal.NonUnitDiagonal
)

Parameters

unitDiagonal  MatrixDiagonal  (Optional)
A MatrixDiagonal value that specifies whether the diagonal elements are read from this matrix or treated as implied ones.

Return Value

TriangularMatrix<T>
A TriangularMatrix<T> view whose stored elements are backed by the upper triangular portion of this matrix.

Remarks

The returned matrix shares storage with this matrix. Changes made through either matrix are visible through the other for elements that are part of the triangular view.

Exceptions

ArgumentOutOfRangeException

rowCount is less than zero or greater than or equal to the number of rows in the matrix.

-or-

columnCount is less than zero or greater than or equal to the number of columns in the matrix.

ExtractUpperTriangle(Int32, Int32, MatrixDiagonal, Int32, Int32)

Note: This API is now obsolete.
Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
C#
[ObsoleteAttribute("Use GetUpperTriangularView instead.")]
public TriangularMatrix<T> ExtractUpperTriangle(
	int rowCount,
	int columnCount,
	MatrixDiagonal unitDiagonal = MatrixDiagonal.NonUnitDiagonal,
	int startRow = 0,
	int startColumn = 0
)

Parameters

rowCount  Int32
The number of rows in the TriangularMatrix<T>.
columnCount  Int32
The number of columns in the TriangularMatrix<T>.
unitDiagonal  MatrixDiagonal  (Optional)
A MatrixDiagonal value that specifies whether the diagonal elements are read from this matrix or treated as implied ones.
startRow  Int32  (Optional)
The row in the matrix of the first element of the new matrix.
startColumn  Int32  (Optional)
The column in the matrix of the first element of the new matrix.

Return Value

TriangularMatrix<T>
A TriangularMatrix<T> view whose stored elements are backed by the upper triangular portion of this matrix.

Remarks

The returned matrix shares storage with this matrix. Changes made through either matrix are visible through the other for elements that are part of the triangular view.

Exceptions

ArgumentOutOfRangeException

rowCount is less than zero or greater than or equal to the number of rows in the matrix.

-or-

columnCount is less than zero or greater than or equal to the number of columns in the matrix.

See Also