Matrix.CopyFromHermitian Method

Definition

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

Overload List

CopyFromHermitian<T>(Matrix<T>, MatrixTriangle, ArrayMutability) Returns an independent copy of a matrix made Hermitian using one triangle.
CopyFromHermitian<T>(Matrix<T>, Int32, MatrixTriangle, ArrayMutability) Returns an independent copy of a matrix made Hermitian using one triangle, with an explicit size.
CopyFromHermitian<T>(T[], Int32, MatrixTriangle, MatrixElementOrder, ArrayMutability) Creates a new HermitianMatrix<T> by copying data from a one-dimensional array.

CopyFromHermitian<T>(Matrix<T>, MatrixTriangle, ArrayMutability)

Returns an independent copy of a matrix made Hermitian using one triangle.
C#
public static Matrix<T> CopyFromHermitian<T>(
	Matrix<T> source,
	MatrixTriangle triangle = MatrixTriangle.Upper,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  Matrix<T>
The source matrix.
triangle  MatrixTriangle  (Optional)
Specifies which triangle of source holds the authoritative values. The default is Upper.
mutability  ArrayMutability  (Optional)
The desired mutability of the copy. The default is MutableValues.

Type Parameters

T
The element type of the matrix.

Return Value

Matrix<T>
A matrix where the lower triangle is the conjugate of the upper triangle (or vice versa). In Professional edition this may be a HermitianMatrix<T>.

Exceptions

ArgumentNullException

source is null.

CopyFromHermitian<T>(Matrix<T>, Int32, MatrixTriangle, ArrayMutability)

Returns an independent copy of a matrix made Hermitian using one triangle, with an explicit size.
C#
public static Matrix<T> CopyFromHermitian<T>(
	Matrix<T> source,
	int size,
	MatrixTriangle triangle = MatrixTriangle.Upper,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  Matrix<T>
The source matrix.
size  Int32
The number of rows and columns of the copy. Must be between 0 and the smaller of the row count and column count of source (inclusive).
triangle  MatrixTriangle  (Optional)
Specifies which triangle of source holds the authoritative values. The default is Upper.
mutability  ArrayMutability  (Optional)
The desired mutability of the copy. The default is MutableValues.

Type Parameters

T
The element type of the matrix.

Return Value

Matrix<T>
A new size×size matrix where the lower triangle is the conjugate of the upper triangle (or vice versa).

Exceptions

ArgumentNullException

source is null.

ArgumentOutOfRangeException

size is less than 0 or greater than the smaller of the row count and column count of source.

CopyFromHermitian<T>(T[], Int32, MatrixTriangle, MatrixElementOrder, ArrayMutability)

Creates a new HermitianMatrix<T> by copying data from a one-dimensional array.
C#
public static HermitianMatrix<T> CopyFromHermitian<T>(
	T[] source,
	int dimension,
	MatrixTriangle storedTriangle = MatrixTriangle.Upper,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  T[]
A one-dimensional array containing full square matrix storage. Only the triangle specified by storedTriangle is used as the authoritative stored part of the Hermitian matrix.
dimension  Int32
The number of rows and columns in the Hermitian matrix.
storedTriangle  MatrixTriangle  (Optional)
Specifies whether the upper or lower triangle is stored in source.
elementOrder  MatrixElementOrder  (Optional)
A MatrixElementOrder value that indicates whether the elements in source are stored in column-major or row-major order.
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

HermitianMatrix<T>
A new HermitianMatrix<T> with copied data.

Exceptions

ArgumentNullExceptionsource is null.
ArgumentException The length of source is less than dimension * dimension.

See Also