Skip to content

num::inverse_sqrt_lanczos

Defined in header <linear/eigen/lanczos.hpp>

template <class Op>
requires spd_operator<Op, vec<real>>
lanczos_action_result inverse_sqrt_lanczos(const Op &A,
                                           const vec<real> &right_hand_side,
                                           real tolerance = 1e-8, idx max_steps = 0);

Approximate \(A^{-1/2}b\) for a symmetric positive-definite operator.

At step \(m\), the returned vector is \(\|b\|_2 Q_m T_m^{-1/2}e_1\). Iteration stops when consecutive projected actions differ by at most tolerance in relative Euclidean norm, or when max_steps is reached.