pub struct IncompleteCholesky { /* private fields */ }Expand description
An incomplete Cholesky factorisation A + α diag(A) ≈ L Lᵀ, with L lower triangular.
Implementations§
Source§impl IncompleteCholesky
impl IncompleteCholesky
Sourcepub fn ic0(a: &CsrMatrix) -> Result<IncompleteCholesky>
pub fn ic0(a: &CsrMatrix) -> Result<IncompleteCholesky>
IC(0): the factor has exactly the sparsity pattern of the lower triangle of A. If a pivot
turns out non-positive, which can happen even for an SPD matrix, the factorisation is
restarted with the diagonal increased to (1 + α) diag(A) for a growing α (Manteuffel’s
shift); the shift used is reported by IncompleteCholesky::shift.
Sourcepub fn ic0_shifted(a: &CsrMatrix, shift: f64) -> Result<IncompleteCholesky>
pub fn ic0_shifted(a: &CsrMatrix, shift: f64) -> Result<IncompleteCholesky>
IC(0) with a given shift α ≥ 0 and no retry: fails with
LinalgError::NotPositiveDefinite if a pivot is not positive.
Sourcepub fn ic_k(
a: &CsrMatrix,
level: usize,
modified: bool,
) -> Result<IncompleteCholesky>
pub fn ic_k( a: &CsrMatrix, level: usize, modified: bool, ) -> Result<IncompleteCholesky>
IC(k): the factor keeps the entries whose level of fill is at most level. Entries of A
have level 0, and an entry created by eliminating column j from entries of levels a and
b has level a + b + 1; IC(0) is IncompleteCholesky::ic0, and a large level gives the
exact factor. With modified, every update that is dropped is subtracted from the two
diagonal entries it would have changed (MIC, Gustafsson 1978), so that L Lᵀ has the row
sums of A (up to the shift): this improves the condition number of the preconditioned
system of a Laplacian-like matrix from O(h⁻²) to O(h⁻¹). The elimination is
right-looking, because the compensation changes diagonals that are not yet used.
A failing pivot restarts with a shift, as for IncompleteCholesky::ic0.
Sourcepub fn ict(
a: &CsrMatrix,
drop_tol: f64,
max_fill: usize,
) -> Result<IncompleteCholesky>
pub fn ict( a: &CsrMatrix, drop_tol: f64, max_fill: usize, ) -> Result<IncompleteCholesky>
The threshold version, ICT(τ, p): fill is allowed, but every entry of row i smaller than
τ ‖aᵢ‖₂ is dropped, and only the p largest entries of each row are kept (the diagonal
always). With τ = 0 and a large p it is the exact Cholesky factor.
Sourcepub fn ordered(
a: &CsrMatrix,
ordering: IcOrdering,
factor: impl FnOnce(&CsrMatrix) -> Result<IncompleteCholesky>,
) -> Result<IncompleteCholesky>
pub fn ordered( a: &CsrMatrix, ordering: IcOrdering, factor: impl FnOnce(&CsrMatrix) -> Result<IncompleteCholesky>, ) -> Result<IncompleteCholesky>
The factorisation of P A Pᵀ for the ordering P chosen by ordering, with factor (for
example |m| IncompleteCholesky::ic_k(m, 1, false)); IncompleteCholesky::solve applies
the permutation, so the result is used exactly like an unordered factor. Ordering helps
ICT and IC(k) most; IC(0) keeps the pattern of A, which an ordering changes.