Matrix.Create Symmetric<T>(Int 32, T[], Matrix Triangle, Matrix Element Order, Boolean, Array Mutability) Method
Constructs a new symmetrical matrix of the
specified dimension using the specified values.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A symmetric matrix.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static SymmetricMatrix<T> CreateSymmetric<T>(
int dimension,
T[] values,
MatrixTriangle storedTriangle,
MatrixElementOrder elementOrder,
bool reuseComponentArray,
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.
- reuseComponentArray 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.