LinearOperator

Trait LinearOperator 

Source
pub trait LinearOperator<T>: Send + Sync
where T: ComplexField,
{ // Required methods fn num_rows(&self) -> usize; fn num_cols(&self) -> usize; fn apply( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>; fn apply_transpose( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>; // Provided methods fn apply_hermitian( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>> { ... } fn is_square(&self) -> bool { ... } }
Expand description

Trait for linear operators (matrices) that can perform matrix-vector products.

This abstraction allows solvers to work with dense matrices, sparse matrices, and matrix-free operators (e.g., FMM) interchangeably.

Required Methods§

Source

fn num_rows(&self) -> usize

Number of rows in the operator

Source

fn num_cols(&self) -> usize

Number of columns in the operator

Source

fn apply( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>

Apply the operator: y = A * x

Source

fn apply_transpose( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>

Apply the transpose: y = A^T * x

Provided Methods§

Source

fn apply_hermitian( &self, x: &ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>, ) -> ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>

Apply the Hermitian (conjugate transpose): y = A^H * x

Source

fn is_square(&self) -> bool

Check if the operator is square

Implementors§