Matrix.Create Random Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Create | Constructs a new matrix with uniform random numbers between 0 and 1. |
Create | Constructs a new matrix with uniform random numbers between 0 and 1. |
CreateRandom(Int32, Int32, ArrayMutability)
Constructs a new matrix with uniform random numbers between 0 and 1.
public static DenseMatrix<double> CreateRandom(
int rowCount,
int columnCount,
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.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Return Value
DenseMatrix<Double>A DenseMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. |
CreateRandom(Int32, Int32, Random, ArrayMutability)
Constructs a new matrix with uniform random numbers between 0 and 1.
public static DenseMatrix<double> CreateRandom(
int rowCount,
int columnCount,
Random random,
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.
- random Random
- A random number generator used to generate samples from the distribution.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Return Value
DenseMatrix<Double>A DenseMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. |
Argument | random is null. |