kumulant

MatrixView

@Serializable
sealed interface MatrixView(source)

Read-only N-by-M matrix. Sealed alongside VectorView so snapshots round-trip through kotlinx.serialization with their concrete storage preserved. Public surface is read-only; shape, entry access, materialise to Array<DoubleArray>. Mutation, factorisations, and arithmetic are internal to kumulant.

Surfaced primarily by the full-covariance regression results: com.eignex.kumulant.stat.regression.glm.CovarianceRegressionResult carries the posterior covariance and its Cholesky factor as MatrixViews so a downstream consumer can sample from the joint posterior without recomputing the decomposition.

Only DenseMatrix today. A CSR/CSC sparse matrix can land here when a consumer needs it; the only callers today (full-covariance regression stats) have intrinsically dense state.

Inheritors

Properties

Link copied to clipboard
abstract val cols: Int

Number of columns.

Link copied to clipboard
abstract val rows: Int

Number of rows.

Functions

Link copied to clipboard
abstract operator fun get(i: Int, j: Int): Double

Read entry at row i, column j.

Link copied to clipboard
abstract fun toArray(): Array<DoubleArray>

Materialise into a fresh row-major Array<DoubleArray>. Always allocates; the result is independent of any internal storage.

cols

abstract val cols: Int(source)

Number of columns.

get

abstract operator fun get(i: Int, j: Int): Double(source)

Read entry at row i, column j.

rows

abstract val rows: Int(source)

Number of rows.

toArray

abstract fun toArray(): Array<DoubleArray>(source)

Materialise into a fresh row-major Array<DoubleArray>. Always allocates; the result is independent of any internal storage.