api / koma.internal.default.generated.matrix / DefaultFloatMatrixFactory

DefaultFloatMatrixFactory

class DefaultFloatMatrixFactory :MatrixFactory<Matrix<Float>>

Constructors

Name Summary
<init> DefaultFloatMatrixFactory()

Functions

Name Summary
arange fun arange(start:Double, stop:Double, increment:Double):Matrix<Float>
fun arange(start:Int, stop:Int, increment:Int):Matrix<Float>
Creates a row-vector with the first value of start and the last value of stop, with increment steps between each value.fun arange(start:Double, stop:Double):Matrix<Float>
fun arange(start:Int, stop:Int):Matrix<Float>
Creates a row-vector with the first value of start and the last value of stop, with unit steps between each value.
create fun create(data:IntRange):Matrix<Float>
Creates a row-vector with initial values pulled from an int range, e.g. 1..45fun create(data:DoubleArray):Matrix<Float>
Creates a row-vector with initial values pulled from a double arrayfun create(data:Array<DoubleArray>):Matrix<Float>
Creates a matrix from an array of arrays (row-major)
eye fun eye(size:Int):Matrix<Float>
Creates an identity matrix of the requested shapefun eye(rows:Int, cols:Int):Matrix<Float>
Creates an identity matrix of the requested shape, with zero padding if the axis lengths arent equal.
ones fun ones(rows:Int, cols:Int):Matrix<Float>
Creates a one initialized matrix of the requested shape
rand fun rand(rows:Int, cols:Int):Matrix<Float>
Creates a matrix of uniform 0-1 random samples
randn fun randn(rows:Int, cols:Int):Matrix<Float>
Creates a matrix of unit-normal random samples
zeros fun zeros(rows:Int, cols:Int):DefaultFloatMatrix
Generate a zero initialized matrix of the requested shape.