ReferenceSparseLinearAlgebra
The portable sparse backend: every routine in Kotlin, no host dependency, and the semantic reference a host backend is validated against.
Every operation is an interface default, so this object overrides nothing — the algorithms live on the seams where a backend can replace them one at a time.
Properties
name
Relative preference among simultaneously available backends: automatic selection through registerBackend — JVM classpath discovery, native startup registration — picks the highest per half. The portable reference is 0; native-accelerated backends rank above it (koblas-openblas 100, koblas-cblas 90).
Functions
Sum |x_i| over the stored entries.
xᵀ·y for two sparse vectors, merging their index lists in one pass — O(nnz_x + nnz_y).
Factorize the square a into something solvable, never null.
A · x, or Aᵀ · x when transpose, into a fresh result — the restricted gemv with alpha = 1, beta = 0.
Euclidean norm over the stored entries.