F64SparseLuAdapter
Shared routing for a host sparse LU binding, the counterpart of the dense host adapters.
Below the gate a request is answered by the portable factorization, since crossing into a native library costs more than the work saves on a small problem. The gate is the shared factorization threshold, read here as a count of stored entries rather than as a dimension, because that is what sparse work scales with: an n of a thousand with a diagonal and little else is smaller work than a dense hundred.
Parameters
stored entries from which this binding factorizes natively, or null for the platform default.
Inheritors
Properties
isAvailable
Whether this backend can do work on this host. koblas's own implementations always can, so the default is true; a binding reports whether the library it calls resolved.
Each half answers for itself, since a host can provide CBLAS without LAPACKE, or OpenBLAS without UMFPACK. Registration does not consult this: koblas registers its UMFPACK binding on a bare library lookup and lets the binding fall back per call, so a registered backend may still report false here. Read it to report what a host offers, or before installing one explicitly.
isPortable
Whether this is koblas's own implementation rather than a binding to a host library. The compiled-in SIMD kernels are portable however fast they are; only something calling out counts as accelerated.
Relative preference among the backends offered for one half (F64Blas, F64Decompositions, F64Kernels or a sparse counterpart). registerBackend picks the highest; the portable reference is 0.
Whether factorBasis answers with a factorization that updates its factors in place. When false a replacement costs a factorization, so a caller pacing its own refactorizations has nothing left to pace.
Functions
factor
Factorize the square a into something solvable. A singular matrix comes back as a factorization reporting singular rather than as an exception, with a failedAt counting elimination steps rather than naming a column: the step that fails is the one with no acceptable pivot left, so there is no column of a to attribute it to.
Parameters
the square matrix to factorize.
scale rows by a power of two first; the solves undo it.
discard produced entries this far below the largest magnitude, giving an incomplete factorization.
Factor a simplex basis for column replacements.
solveInto into a fresh vector.