DenseMatrix<T>.GetUpperTriangularView Method

Definition

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

Overload List

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

GetUpperTriangularView(MatrixDiagonal)

Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
C#
public TriangularMatrix<T> GetUpperTriangularView(
	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.

GetUpperTriangularView(Int32, Int32, MatrixDiagonal)

Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
C#
public TriangularMatrix<T> GetUpperTriangularView(
	int rowCount,
	int columnCount,
	MatrixDiagonal unitDiagonal = MatrixDiagonal.NonUnitDiagonal
)

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.

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.

GetUpperTriangularView(Int32, Int32, MatrixDiagonal, Int32, Int32)

Returns a TriangularMatrix<T> view over the upper triangular portion of this matrix.
C#
public abstract TriangularMatrix<T> GetUpperTriangularView(
	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