koblas

SingularSparseFactorization

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

Markowitz pivoting stops at the failing column with a partially eliminated matrix and no usable factors, so there is nothing to hand back — and fabricating a SparseLu whose buffers were never filled would produce an object that answers solve with silent nonsense. This reports what is true instead: singular, no fill, zero determinant, and an exception if solved against.

Constructors

SingularSparseFactorization

constructor(n: Int, failedAt: Int)(source)

Properties

failedAt

open override val failedAt: Int(source)

The pivot position that had no numerically acceptable candidate, or NOT_SINGULAR when the factorization succeeded.

The same convention com.eignex.koblas.dense.LuDecomposition reports, and the position is the actionable half: a simplex whose basis went singular can use it to choose which column to replace.

n

open override val n: Int(source)

The dimension of the factored matrix.

nnz

open override val nnz: Int(source)

Nonzeros in the factors — the fill. Zero for a singular factorization, which has none.

Link copied to clipboard
open val singular: Boolean

Whether the factorization failed for want of a numerically acceptable pivot. Derived from failedAt, so the two cannot disagree.

Functions

determinant

open override fun determinant(): Double(source)

det(B), or exactly 0.0 when singular. The counterpart of LuDecomposition.determinant.

solveInto

open override fun solveInto(b: DoubleArray, out: DoubleArray, transpose: Boolean = false, workspace: Workspace? = null): DoubleArray(source)

Solve B x = b, or Bᵀ x = b when transpose, into out, which is returned.

The two directions are a simplex's FTRAN and BTRAN. Allocates nothing when given a workspace, so an iteration that owns its destination runs without touching the collector. out may be b.

Link copied to clipboard
open fun solve(b: DoubleArray, transpose: Boolean = false): DoubleArray

Solve B x = b, or Bᵀ x = b when transpose, into a fresh result.