mtl5.sparse.KLU_f64#
- class mtl5.sparse.KLU_f64(*args, **kwargs)#
- property B#
The permuted, scaled matrix P*(R*A)*Q, as a copy. It is block upper triangular: only its diagonal blocks are factored, and the blocks above them are used as they are in the block back-substitution.
- property accumulator#
The accumulator policy this factor was built with
- block()#
The factors of diagonal block i, as copies: a dict with ‘start’ and ‘stop’ (its span in B), and ‘L’, ‘U’, ‘row_perm’ and ‘col_perm’ in the block’s own indices. With Bi = B[start:stop, start:stop], Bi[row_perm][:, col_perm] == L @ U, exactly up to rounding when num_perturbed == 0. Negative i counts from the end.
Signatures:
block(self, i: int) -> dict
- property block_starts#
Block boundaries, length nblocks + 1: block i spans rows and columns block_starts[i]:block_starts[i+1] of B
- property col_perm#
Column permutation of the block triangular form, q[new] = old
- property dtype#
(self) -> str
- property n#
(self) -> int
- property nblocks#
Diagonal blocks found by the block triangular form; more blocks means more reducible structure to exploit
- property nnz#
Nonzeros in L plus U, summed over the diagonal blocks
- property num_perturbed#
Pivots replaced by perturbation across all blocks
- refactor()#
Recompute the numeric factors for a matrix with the SAME sparsity pattern, reusing the BTF permutation, per-block ordering and pivot sequence — the SPICE transient path
Signatures:
refactor(self, A: mtl5._core.SparseMatrix_f64) -> None
- property row_perm#
Row permutation of the block triangular form, p[new] = old. B == (diag(row_scale) @ A)[row_perm][:, col_perm].
- property row_scale#
Row equilibration factors indexed by ORIGINAL row, or None when the matrix was factored unscaled (scale=False)
- property shape#
(self) -> tuple[int, int]
- solve()#
Solve A x = b by block back-substitution
Signatures:
solve(self, b: ndarray[dtype=float64, shape=(*), order='C', device='cpu', writable=False]) -> mtl5._core.DenseVector_f64