Matrix.Create<T>(Int 32, Int 32, Func<Int 32, Int 32, T>, Array Mutability) Method
Constructs a new matrix with the specified
number of rows and columns whose elements are all equal to the specified value.
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,
Func<int, int, T> initializer,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- rowCount Int32
- The number of rows in the new matrix.
- columnCount Int32
- The number of columns in the new matrix.
- initializer Func<Int32, Int32, T>
- A delegate that takes a row, column pair and returns the value of the corresponding element.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Type Parameters
- T
Return Value
DenseMatrix<T>A DenseMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. |
Argument | initializer is null. |