DenseMatrix
Dense row-major matrix backed by a single contiguous DoubleArray of length rows * cols. Element (i, j) lives at data[i * cols + j].
Flat layout buys three properties: one heap allocation rather than rows separate row arrays; cache-friendly sweeps across row boundaries; the SIMD primitives in the internal Primitives.kt can stream long runs without re-fetching row references on each iteration.
The on-the-wire form is a 2D Array<DoubleArray> for readability when inspecting JSON / CBOR payloads. The in-memory form is flat. The custom DenseMatrixSerializer bridges the two; encoding writes a 2D array, decoding reads one back and packs it into the flat backing.
Mutation is internal; DenseMatrix is effectively immutable from outside the kumulant module.
Types
Factory entrypoints for DenseMatrix.
Properties
DenseMatrix
cols
equals
get
hashCode
rows
toArray
Materialise into a fresh row-major Array<DoubleArray>. Always allocates; the result is independent of any internal storage.