Matrix.Create<T>(Int 32, Int 32, T[], Matrix Element Order, Boolean, Array Mutability) Method
Constructs a new matrix of the specified
dimensions using the specified values array.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A DenseMatrix<T>.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static DenseMatrix<T> Create<T>(
int rowCount,
int columnCount,
T[] values,
MatrixElementOrder elementOrder,
bool reuseComponentArray = false,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- rowCount Int32
- The number of rows.
- columnCount Int32
- The number of columns.
- values T[]
- An array of values that contain the elements of the matrix in column-major order.
- elementOrder MatrixElementOrder
- A MatrixElementOrder value that specifies the order in which the matrix elements are stored in the storage array values.
- reuseComponentArray Boolean (Optional)
- If true, the array referenced by Specifies how the matrix's values may be changed. The default is mutable values.values is used directly for element storage without being copied. Any changes to the elements of this matrix will also affect the original array, and vice versa. If false, the elements are copied from values to a new array.
- mutability ArrayMutability (Optional)
Type Parameters
- T
Return Value
DenseMatrix<T>A DenseMatrix<T>.
Exceptions
Argument | values is null |
Argument | rowCount is less than zero. -or- columnCount is less than zero. |