Matrix.random constructor
Matrix.random(})
Returns randomly filled matrix of rowCount
xcolumnCount
dimension
Implementation
factory Matrix.random(int rowCount, int columnCount,
{DType dtype = DType.float32,
num min = -1000,
num max = 1000,
int? seed}) {
switch (dtype) {
case DType.float32:
return Float32Matrix.random(dtype, rowCount, columnCount,
min: min, max: max, seed: seed);
case DType.float64:
return Float64Matrix.random(dtype, rowCount, columnCount,
min: min, max: max, seed: seed);
default:
throw UnimplementedMatrixException(dtype);
}
}