koblas

sparse

Sparse linear algebra over the CSC com.eignex.koblas.core.F64SparseMatrix, behind three swappable seams that mirror the dense ones.

  • F64SparseKernels — the sparse level-1 tier: a sparse vector against a dense one (usdot, usaxpy in Sparse BLAS terms) or against another sparse one, plus scatter and the reductions. Unlike the dense F64Kernels there is no length threshold, because the fallback here is an object rather than a compiled-in primitive and there is no compile-time kernel to protect.

  • F64SparseBlas — the sparse matrix routines. gemv in both directions, walking columns, which is what CSC stores. Deliberately thin: a sparse gemm fills in and is a different algorithm with a different result type, so it lands here when something needs it.

  • F64SparseLu — general sparse LU factorization. F64SparseLu.factor returns F64SparseFactorization, never null: a singular matrix yields a factorization reporting singular, matching the dense contract. Its factors support both ordinary and transposed solves.

  • F64BasisFactorization — a sparse LU factorization of a simplex basis. It retains the basis matrix and can produce the factorization after one column replacement.

  • F64SparseLinearAlgebra pairs the matrix seams and exposes the sparse-vector kernels alongside them. Backends may implement either matrix half; com.eignex.koblas.registerBackend ranks each independently, while com.eignex.koblas.installBackends supplies all three through com.eignex.koblas.koblas.

  • Implementation: F64SparseLuFactorization, a Markowitz threshold-pivoting P·B·Q = L·U that keeps the factors sparse instead of filling toward O(m²).

F64SparseFactorization is an interface rather than a class, which is the one place this deviates from the dense shape. LAPACK's packed formats are a standard, so a dense com.eignex.koblas.dense.F64LuDecomposition travels between backends; no sparse solver describes its factors — UMFPACK hands back a void *, KLU and CHOLMOD their own structs — so a seam demanding a concrete type could never admit one.

The containers themselves live in the parent package, alongside the dense ones, because the sealed view roots require their subtypes in one package.

Types

Link copied to clipboard

A sparse factorization of a simplex basis that can follow a replacement of one basis column.

Link copied to clipboard

The portable sparse backend, available on every target. The sparse seams declare their routines and this implements them, so a binding that means to accelerate one cannot inherit the portable version by accident.

Link copied to clipboard

What F64SparseLu.factor returns when no numerically acceptable pivot remains.

Link copied to clipboard

Sparse matrix routines as a backend half.

Link copied to clipboard

A factorization held for reuse against further right-hand sides.

Link copied to clipboard

Sparse vector-vector routines as a backend half.

Link copied to clipboard

The sparse matrix halves, with the active sparse-vector kernels used by their surrounding operations.

Link copied to clipboard
interface F64SparseLu : Backend

Sparse LU factorization as a backend half.

Link copied to clipboard

Double-precision F64SingularSparseFactorization, what an unqualified SingularSparseFactorization means.

Link copied to clipboard

Double-precision F64SparseBlas, the sparse matrix half an unqualified SparseBlas means.

Link copied to clipboard

Double-precision F64SparseFactorization, the reusable factorization an unqualified SparseFactorization means.

Link copied to clipboard

Double-precision F64SparseKernels, the half an unqualified SparseKernels means.

Link copied to clipboard

Double-precision F64SparseLinearAlgebra, the pair of sparse halves an unqualified SparseLinearAlgebra means.

Link copied to clipboard

Double-precision F64SparseLuFactorization, the sparse LU an unqualified SparseLu means.

Link copied to clipboard

Double-precision F64SparseLu, the sparse LU backend half.

Functions

Link copied to clipboard
fun F64SparseMatrix.gemv(x: DoubleArray, transpose: Boolean = false): DoubleArray

this · x, or thisᵀ · x when transpose, with the active backend (koblas).

Link copied to clipboard
fun F64SparseMatrix.lu(equilibrate: Boolean = false, dropTolerance: Double = NO_DROP): F64SparseFactorization

Factorize this sparse matrix with the active backend (koblas), the counterpart of F64DenseMatrix.lu.

Link copied to clipboard

The shapes F64SparseFactorization.solveInto requires of its right-hand side and its destination.

Link copied to clipboard
fun F64SparseMatrix.trsv(x: DoubleArray, lower: Boolean, transpose: Boolean = false, unitDiag: Boolean = false)

Solve op(T) · x = b in place against this matrix's lower or upper triangle, with the active backend (koblas). See F64SparseBlas.trsv.