api / koma.ndarray / NumericalNDArrayFactory

NumericalNDArrayFactory

interface NumericalNDArrayFactory<T :Number> :GenericNDArrayFactory<T>

A set of constructors for a koma NDArray containing numerical data. For generic factories, see GenericNDArrayFactory.

Functions

Name Summary
ones abstract fun ones(vararg lengths:Int):NDArray<T>
Creates a 1 initialized ND container of the requested shape
rand abstract fun rand(vararg lengths:Int):NDArray<T>
Creates a ND container of uniform 0-1 random samples
randn abstract fun randn(vararg lengths:Int):NDArray<T>
Creates a ND container of unit-normal random samples
zeros abstract fun zeros(vararg lengths:Int):NDArray<T>
Generate a zero initialized ND container of the requested shape

Inherited Functions

Name Summary
createGeneric abstract fun createGeneric(lengths:IntArray, filler: (IntArray) ->T):NDArray<T>
Generate an ND container of the requested shape without initializing its contents.

Extension Functions

Name Summary
create funNumericalNDArrayFactory<Byte>.create(vararg lengths:Int, filler: (idx:IntArray) ->Byte):NDArray<Byte>
funNumericalNDArrayFactory<Double>.create(vararg lengths:Int, filler: (idx:IntArray) ->Double):NDArray<Double>
funNumericalNDArrayFactory<Float>.create(vararg lengths:Int, filler: (idx:IntArray) ->Float):NDArray<Float>
funNumericalNDArrayFactory<Int>.create(vararg lengths:Int, filler: (idx:IntArray) ->Int):NDArray<Int>
funNumericalNDArrayFactory<Long>.create(vararg lengths:Int, filler: (idx:IntArray) ->Long):NDArray<Long>
funNumericalNDArrayFactory<Short>.create(vararg lengths:Int, filler: (idx:IntArray) ->Short):NDArray<Short>
fun <T>GenericNDArrayFactory<T>.create(vararg lengths:Int, filler: (idx:IntArray) ->T):DefaultGenericNDArray<T>

Inheritors

Name Summary
DefaultByteNDArrayFactory class DefaultByteNDArrayFactory :NumericalNDArrayFactory<Byte>
DefaultDoubleNDArrayFactory class DefaultDoubleNDArrayFactory :NumericalNDArrayFactory<Double>
DefaultFloatNDArrayFactory class DefaultFloatNDArrayFactory :NumericalNDArrayFactory<Float>
DefaultIntNDArrayFactory class DefaultIntNDArrayFactory :NumericalNDArrayFactory<Int>
DefaultLongNDArrayFactory class DefaultLongNDArrayFactory :NumericalNDArrayFactory<Long>
DefaultShortNDArrayFactory class DefaultShortNDArrayFactory :NumericalNDArrayFactory<Short>