LinearOperator

Trait LinearOperator 

Source
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

Required Methods§

Source

fn num_rows(&self) -> usize

Number of rows

Source

fn num_cols(&self) -> usize

Number of columns

Source

fn apply(&self, x: &Array1<Complex64>) -> Array1<Complex64>

Apply the operator: y = A * x

Source

fn apply_transpose(&self, x: &Array1<Complex64>) -> Array1<Complex64>

Apply the transpose operator: y = A^T * x

Provided Methods§

Source

fn is_square(&self) -> bool

Check if the operator is square

Implementors§