koblas

Companion

Factory entrypoints for DenseMatrix.

Functions

diagonal

fun diagonal(size: Int, diagonal: Double = 1.0): DenseMatrix(source)

Create an NxN identity matrix scaled by diagonal.

of

Copy an Array<DoubleArray> of rows into a fresh dense matrix.

wrap

fun wrap(rows: Int, cols: Int, data: DoubleArray): DenseMatrix(source)

Wrap an existing flat DoubleArray of length rows * cols without copying.