Matrix.CreateSymmetric Method

Definition

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

Overload List

CreateSymmetric<T>(Int32) Constructs a new symmetrical matrix with the specified dimension.
CreateSymmetric<T>(Int32, MatrixTriangle) Constructs a new symmetrical matrix with the specified dimension.
CreateSymmetric<T>(Int32, T[], MatrixTriangle, MatrixElementOrder) Constructs a new symmetrical matrix of the specified dimension using the specified values.
CreateSymmetric<T>(Int32, Array2D<T>, MatrixTriangle, MatrixElementOrder, ArrayMutability) Constructs a new symmetrical matrix of the specified dimension using the specified values.
CreateSymmetric<T>(Int32, Memory2D<T>, MatrixTriangle, MatrixElementOrder, ArrayMutability) Constructs a new symmetrical matrix of the specified dimension using the specified values.
CreateSymmetric<T>(Int32, T[], MatrixTriangle, MatrixElementOrder, Boolean, ArrayMutability) Constructs a new symmetrical matrix of the specified dimension using the specified values.

CreateSymmetric<T>(Int32)

Constructs a new symmetrical matrix with the specified dimension.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.

Type Parameters

T

Return Value

SymmetricMatrix<T>
A symmetric matrix.

CreateSymmetric<T>(Int32, MatrixTriangle)

Constructs a new symmetrical matrix with the specified dimension.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension,
	MatrixTriangle storedTriangle
)

Parameters

dimension  Int32
The number of rows and columns Specifies whether the upper or lower triangle is stored. in the new symmetric matrix.
storedTriangle  MatrixTriangle
 

Type Parameters

T

Return Value

SymmetricMatrix<T>
A symmetric matrix.

CreateSymmetric<T>(Int32, T[], MatrixTriangle, MatrixElementOrder)

Constructs a new symmetrical matrix of the specified dimension using the specified values.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension,
	T[] values,
	MatrixTriangle matrixTriangle,
	MatrixElementOrder elementOrder
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.
values  T[]
An Array of values containing the elements of the symmetric matrix in column-major order
matrixTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether to take the elements from the upper or lower triangle of the element values.
elementOrder  MatrixElementOrder
A MatrixElementOrder value that indicates whether the elements in values are stored in column-major or row-major order.

Type Parameters

T

Return Value

SymmetricMatrix<T>
A symmetric matrix.

Remarks

The array values must contain the elements of the matrix, column by column. Depending on the value of matrixTriangle, the values in the upper or lower triangular part of this array are used. The other elements must be present, but their value is irrelevant.

CreateSymmetric<T>(Int32, Array2D<T>, MatrixTriangle, MatrixElementOrder, ArrayMutability)

Constructs a new symmetrical matrix of the specified dimension using the specified values.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension,
	Array2D<T> storage,
	MatrixTriangle storedTriangle,
	MatrixElementOrder elementOrder,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.
storage  Array2D<T>
A 2D array containing the elements of the symmetric matrix in column-major order
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether to take the elements from the upper or lower triangle of the element values.
elementOrder  MatrixElementOrder
A MatrixElementOrder value that indicates whether the elements 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

Return Value

SymmetricMatrix<T>
A symmetric matrix.

Remarks

The array storage must contain the elements of the matrix, column by column. Depending on the value of storedTriangle, the values in the upper or lower triangular part of this array are used. The other elements must be present, but their value is irrelevant.

CreateSymmetric<T>(Int32, Memory2D<T>, MatrixTriangle, MatrixElementOrder, ArrayMutability)

Constructs a new symmetrical matrix of the specified dimension using the specified values.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension,
	Memory2D<T> storage,
	MatrixTriangle storedTriangle,
	MatrixElementOrder elementOrder,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.
storage  Memory2D<T>
A 2D array containing the elements of the symmetric matrix in column-major order
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether to take the elements from the upper or lower triangle of the element values.
elementOrder  MatrixElementOrder
A MatrixElementOrder value that indicates whether the elements 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

Return Value

SymmetricMatrix<T>
A symmetric matrix.

Remarks

The array storage must contain the elements of the matrix, column by column. Depending on the value of storedTriangle, the values in the upper or lower triangular part of this array are used. The other elements must be present, but their value is irrelevant.

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

Constructs a new symmetrical matrix of the specified dimension using the specified values.
C#
public static SymmetricMatrix<T> CreateSymmetric<T>(
	int dimension,
	T[] values,
	MatrixTriangle storedTriangle,
	MatrixElementOrder elementOrder,
	bool reuseValuesArray,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.
values  T[]
An Array of values containing the elements of the symmetric matrix in column-major order
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether to take the elements from the upper or lower triangle of the element values.
elementOrder  MatrixElementOrder
A MatrixElementOrder value that indicates whether the elements in values are stored in column-major or row-major order.
reuseValuesArray  Boolean
Specifies whether the values array should be copied or reused for internal storage.
mutability  ArrayMutability  (Optional)
Specifies how the matrix's values may be changed. The default is mutable values.

Type Parameters

T

Return Value

SymmetricMatrix<T>
A symmetric matrix.

Remarks

The array values must contain the elements of the matrix, column by column. Depending on the value of storedTriangle, the values in the upper or lower triangular part of this array are used. The other elements must be present, but their value is irrelevant.

See Also