pub trait LinearOperator: Send + Sync {
// Required methods
fn num_rows(&self) -> usize;
fn num_cols(&self) -> usize;
fn apply(&self, x: &Array1<Complex64>) -> Array1<Complex64>;
fn apply_transpose(&self, x: &Array1<Complex64>) -> Array1<Complex64>;
// Provided method
fn is_square(&self) -> bool { ... }
}Expand description
Trait for linear operators that can perform matrix-vector products
This abstraction allows iterative solvers to work with:
- Dense matrices (TBEM)
- FMM systems (SLFMM, MLFMM)
- Sparse matrices (CSR)
- Preconditioners