|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
IC(0) preconditioner for SPD compressed2D sparse matrices. More...
#include <ic_0.hpp>
Public Member Functions | |
| ic_0 (const matrix_type &A) | |
| Throws (through throw_or_abort) for a non-square A, and for a pivot that is zero, missing or, for a real Value, negative (issue 925). | |
| template<typename VecX, typename VecB> | |
| void | solve (VecX &x, const VecB &b) const |
| Solve (L*L^T)*x = b: forward (L*y=b), then backward (L^T*x=y). | |
| template<typename VecX, typename VecB> | |
| void | adjoint_solve (VecX &x, const VecB &b) const |
| Solve (L*L^T)^H * x = b. | |
IC(0) preconditioner for SPD compressed2D sparse matrices.
Computes L such that L*L^T approximates A with the same sparsity pattern. For a complex Value that is L*L^T, not L*L^H: the factorization conjugates nothing, so it models a complex SYMMETRIC A (A^T == A), not a Hermitian one.
Accumulator selects how the factorization and the triangular solves accumulate (see math/accumulator_traits.hpp and the header note). The default void keeps the naive value_type arithmetic unchanged.
|
inlineexplicit |
Throws (through throw_or_abort) for a non-square A, and for a pivot that is zero, missing or, for a real Value, negative (issue 925).
A complex Value models a complex symmetric A, which has no sign, so only a zero pivot is rejected there.
|
inline |
Solve (L*L^T)^H * x = b.
This used to delegate to solve(), commented "L*L^T is self-adjoint for real" – true, and wrong for complex: M = L*L^T has M^T == M, so M^H = conj(M), and M^-H is the same two solves with L conjugated. Delegating applied M^-1 instead, violating <M^-1 b, c> == <b, M^-H c> by 3.6e-02 on a complex-symmetric tridiagonal (#394's defect, for complex only). For a real Value conj is the identity, and this is solve() operation for operation.
|
inline |
Solve (L*L^T)*x = b: forward (L*y=b), then backward (L^T*x=y).