DenseMatrix<T>.ExtractSymmetric Method

Definition

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

Overload List

ExtractSymmetric(MatrixTriangle, Boolean) Returns a SymmetricMatrix<T> view over a square block of this matrix.
Obsolete
ExtractSymmetric(Int32, Int32, Int32, MatrixTriangle, Boolean) Returns a SymmetricMatrix<T> view over a square block of this matrix.
Obsolete
ExtractSymmetric(Matrix<T>, Int32, Int32, Int32, MatrixTriangle) Creates a SymmetricMatrix<T> from a part of a matrix.

ExtractSymmetric(MatrixTriangle, Boolean)

Note: This API is now obsolete.
Returns a SymmetricMatrix<T> view over a square block of this matrix.
C#
[ObsoleteAttribute("Use GetSymmetricView instead.")]
public SymmetricMatrix<T> ExtractSymmetric(
	MatrixTriangle storedTriangle,
	bool reuseValuesArray
)

Parameters

storedTriangle  MatrixTriangle
A MatrixTriangle value that indicates whether the elements of the symmetric matrix are stored in the upper or lower triangular portion of the block specified by startRow and startColumn.
reuseValuesArray  Boolean
 

Return Value

SymmetricMatrix<T>
A SymmetricMatrix<T> view whose stored triangle is backed by the specified square block of this matrix.

Remarks

The returned matrix shares storage with this matrix. Only the triangle specified by storedTriangle is used as the stored part of the symmetric matrix.

Exceptions

ArgumentOutOfRangeException

dimension is less than zero

-or-

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

-or-

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

ArgumentException

startRow plus dimension is greater than or equal to the number of rows in the matrix.

-or-

startColumn plus dimension is greater than or equal to the number of columns in the matrix.

ExtractSymmetric(Int32, Int32, Int32, MatrixTriangle, Boolean)

Note: This API is now obsolete.
Returns a SymmetricMatrix<T> view over a square block of this matrix.
C#
[ObsoleteAttribute("Use GetSymmetricView instead.")]
public SymmetricMatrix<T> ExtractSymmetric(
	int dimension,
	int startRow,
	int startColumn,
	MatrixTriangle storedTriangle,
	bool reuseValuesArray
)

Parameters

dimension  Int32
The number of rows and columns of the returned matrix.
startRow  Int32
The row in the matrix of the first element of the new matrix.
startColumn  Int32
The column in the matrix of the first element of the new matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that indicates whether the elements of the symmetric matrix are stored in the upper or lower triangular portion of the block specified by startRow and startColumn.
reuseValuesArray  Boolean
 

Return Value

SymmetricMatrix<T>
A SymmetricMatrix<T> view whose stored triangle is backed by the specified square block of this matrix.

Remarks

The returned matrix shares storage with this matrix. Only the triangle specified by storedTriangle is used as the stored part of the symmetric matrix.

Exceptions

ArgumentOutOfRangeException

dimension is less than zero

-or-

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

-or-

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

ArgumentException

startRow plus dimension is greater than or equal to the number of rows in the matrix.

-or-

startColumn plus dimension is greater than or equal to the number of columns in the matrix.

ExtractSymmetric(Matrix<T>, Int32, Int32, Int32, MatrixTriangle)

Creates a SymmetricMatrix<T> from a part of a matrix.
C#
public static SymmetricMatrix<T> ExtractSymmetric(
	Matrix<T> matrix,
	int dimension,
	int startRow,
	int startColumn,
	MatrixTriangle storedTriangle
)

Parameters

matrix  Matrix<T>
The matrix that contains the elements of the new matrix.
dimension  Int32
The number of rows and columns of the new matrix.
startRow  Int32
The row in matrix of the first element of the new matrix.
startColumn  Int32
The column in matrix of the first element of the new matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that indicates whether the elements of the symmetric matrix are stored in the upper or lower triangular portion of the block specified by startRow and startColumn.

Return Value

SymmetricMatrix<T>
A SymmetricMatrix<T>.

Exceptions

ArgumentNullException

matrix is null.

ArgumentOutOfRangeException

dimension is less than zero

-or-

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

-or-

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

ArgumentException

startRow plus dimension is greater than or equal to the number of rows in matrix.

-or-

startColumn plus dimension is greater than or equal to the number of columns in matrix.

See Also