Top-level
The containers every part of koblas speaks, and the free-function arithmetic over them. The routines themselves live one package down, split by storage: com.eignex.koblas.dense and com.eignex.koblas.sparse. See the README's "BLAS coverage" table for the routine-by-routine mapping to BLAS/LAPACK and the deliberate deviations.
Containers: F64MatrixView / F64DenseMatrix and F64VectorView / F64DenseVector / F64SparseVector, all
@Serializable, plus the CSC F64SparseMatrix. The view roots are sealed, which is what gives the concrete storage a closed set and lets a snapshot round-trip with its type preserved — and is why the containers stay in one package rather than splitting with the operations that consume them.Free-function arithmetic over the views, dispatching dense or sparse by operand type: dot, axpy, scale, norm2, asum, iamax, copy, swap, ger, times, transpose, forEachStored, and the matrix 1-norm norm1.
Shared machinery: Backend (what every backend of every tier reports about itself), the Workspace buffer pool, and the mathBackend identifier. None of these is per element type.
The element type in the names, and the unqualified aliases for the double-precision ones, are collected in
Precision.kt; thedenseandsparsepackages each have the same file for their own names.
Types
Double-precision F64DenseMatrix, the dense matrix an unqualified DenseMatrix means.
Double-precision F64DenseVector, the dense vector an unqualified DenseVector means.
Operands whose shapes do not fit the routine.
Every backend koblas will use for a piece of work, in one object you can hold. Immutable, and itself a F64LinearAlgebra and a F64SparseLinearAlgebra by delegation.
The double-precision F64Context, the context an unqualified KoblasContext means.
What koblas throws when a routine cannot do what was asked. Every one is an IllegalArgumentException.
Double-precision F64MatrixLike, the matrix contract an unqualified MatrixLike means.
Double-precision F64MatrixView, the sealed matrix storage an unqualified MatrixView means.
A Cholesky or a strict L·D·Lᵀ met a pivot that was zero, negative or NaN.
A factorization met an exactly zero pivot, so the matrix it came from has no inverse.
Double-precision F64SparseMatrix, the CSC matrix an unqualified SparseMatrix means.
Double-precision F64SparseVector, the sparse vector an unqualified SparseVector means.
Marks direct access to live structural or factorization storage. Mutating these buffers can invalidate later operations; access is intended for backend interoperability and specialized kernels.
Double-precision F64VectorLike, the vector contract an unqualified VectorLike means.
Double-precision F64VectorView, the sealed vector storage an unqualified VectorView means.
Properties
The priority every host binding koblas ships registers at. A third-party backend is unprobed, and an ILP64 OpenBLAS exports identical symbols while computing wrong answers, caught by reading openblas_get_config.
The process-wide default context: an installBackends override when set, else registered backends, else the portable reference implementations. Every free function in koblas uses this.
What this runtime resolved, for startup logging (e.g. "backend=openblas, kernels=simd(8 lanes)").
Short identifier for the vector kernels the current process resolved, as named by F64PlatformKernels: "scalar", "simd(8 lanes)", or a "+openblas" suffix for a host backend.
The failedAt value of a factorization that succeeded, dense or sparse.
The slots still running koblas's own portable implementation, in declaration order.
A failedAt meaning "singular, but this backend cannot say where". Exists so a host solver like UMFPACK, which counts zero pivots without locating them, need not invent a position or report NOT_SINGULAR.
Functions
Sum of absolute values (BLAS dasum). Sparse vectors sum over stored entries only.
y = y + alpha * x. A sparse x touches only the positions it stores.
The backend installed in slot.
Column j as a fresh vector, copied rather than viewed.
dst = src (BLAS dcopy). A sparse source zero-fills the destination first, so nothing survives.
Runs automatic platform discovery once, registering whatever host backends are available.
aT * b. Any sparse operand goes through F64SparseKernels, walking the stored entries only.
Visit each stored entry as (index, value), in ascending index order for any storage. A F64SparseVector may present numerical zeros as stored, and any other F64VectorLike has every index visited.
Rank-one update A = A + alpha * x * yT (BLAS dger) in place. Subtract by passing alpha = -1.0.
Index of the entry with maximal absolute value (BLAS idamax), -1 for a zero-length vector. Ties resolve to the lowest index, and a vector with no stored entries returns 0.
Overrides the context koblas returns; null restores automatic selection.
Whether slot is filled by something other than koblas's own portable implementation.
Translates a LAPACK info return into a failedAt position. A positive info is the 1-based pivot index; a negative one is an illegal-argument report and maps to NOT_SINGULAR.
Matrix 1-norm, the maximum absolute column sum (LAPACK dlange with norm 1). This is the anorm rcond expects, computed before the matrix is factored.
Euclidean norm (BLAS dnrm2). Rescales when the sum of squares would overflow or underflow, so any finite input gives the correct norm.
Frobenius norm (LAPACK dlange with norm F). Rescales like norm2 against overflow and underflow.
Matrix infinity-norm, the maximum absolute row sum (LAPACK dlange with norm I).
Offers backend as an explicit choice for every half it implements. Explicit registrations outrank automatically discovered ones; among explicit registrations, Backend.priority selects the winner.
Throws unless every one of slots is filled by an accelerated backend.
Row i as a fresh vector, gathered across the backing. Prefer column where the algorithm allows.
v = alpha * v.
Scale column j by d(j) in place, the product A * D for the diagonal D with entries d(j).
Scale column j by d(j) in place for a CSC matrix. The pattern is untouched.
Scale row i by d(i) in place, the product D * A for the diagonal D with entries d(i).
Symmetric rank-1 update A += alpha * x * xT (BLAS dsyr) in place. See F64Blas.syr.
Symmetric rank-2 update A += alpha * (x * yT + y * xT) (BLAS dsyr2) in place. See F64Blas.syr2.
A * B (BLAS dgemm), allocating. gemm accumulates into an existing C instead.
alpha * A, allocating. scale multiplies in place.
alpha * x, allocating. scale multiplies in place.
Matrix-vector product into a fresh dense result for any F64MatrixLike against any F64VectorLike. gemv provide transpose and destination-buffer variants.
Fresh transposed matrix. For products, prefer the transpose flags on gemv and gemm, which read the original storage without copying.
Fresh transposed matrix, still CSC, which makes this the CSC-to-CSR conversion as well. Explicitly stored zeros survive.
-A, allocating.
-x, allocating.