NLA-lib Explorer

NLAlib.lanczosFA

Library ยท def

The Lanczos-FA approximation to f(\mathbf{A})\mathbf{b} after q steps: \mathsf{lanczosFA}(\mathbf{A}, f, \mathbf{b}, q) := \mathsf{compressedCfc}(\mathbf{A}, f, \mathbf{K}_q(\mathbf{A}, \mathbf{b}))\,\mathbf{b}, which is \mathbf{Q}f(\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q})\mathbf{Q}^{\mathsf{H}}\mathbf{b} for every orthonormal basis \mathbf{Q} of \mathcal{K}_q(\mathbf{A}, \mathbf{b}) (HasOrthonormalCols.lanczosFA_eq). Basis-free, total and not an algorithm; the Lanczos recurrence computes it (Matrix.IsHermitian.lanczosFA_eq_lanczosMatrix). Junk values: q = 0 gives \mathbf{0}; non-Hermitian \mathbf{A} gives \mathbf{0} (see compressedCfc). [Saad1992, ยง2]; [ChenPersson2026, (1)].

NLAlib.lanczosFA.{u_1, u_2} {๐•œ : Type u_1} [RCLike ๐•œ] {n : Type u_2} [Fintype n] [DecidableEq n]
  (A : Matrix n n ๐•œ) (f : โ„ โ†’ โ„) (b : n โ†’ ๐•œ) (q : โ„•) : n โ†’ ๐•œ

Full source on GitHub

Import NLAlib.Krylov.Functions.LanczosFA.