Expand description
Krylov subspace methods for solving linear equations with abstract tensors.
This module provides iterative solvers that work with any type implementing TensorLike,
enabling their use in tensor network algorithms without requiring dense vector representations.
§Solvers
gmres: Generalized Minimal Residual Method (GMRES) for non-symmetric systems
§Future Extensions
- CG (Conjugate Gradient) for symmetric positive definite systems
- BiCGSTAB for non-symmetric systems with better convergence properties
§Example
ⓘ
use tensor4all_core::krylov::{gmres, GmresOptions};
// Define a linear operator as a closure
let apply_operator = |x: &T| -> Result<T> {
// Apply your linear operator to x
operator.apply(x)
};
let result = gmres(&apply_operator, &rhs, &initial_guess, &GmresOptions::default())?;Structs§
- Gmres
Options - Options for GMRES solver.
- Gmres
Result - Result of GMRES solver.
- Restart
Gmres Options - Options for restarted GMRES with truncation.
- Restart
Gmres Result - Result of restarted GMRES solver.
Functions§
- gmres
- Solve
A x = busing GMRES (Generalized Minimal Residual Method). - gmres_
with_ truncation - Solve
A x = busing GMRES with optional truncation after each iteration. - restart_
gmres_ with_ truncation - Solve
A x = busing restarted GMRES with truncation.