pub trait MatrixFreeOp<F>{
// Required methods
fn apply(&self, x: &ArrayView1<'_, F>) -> LinalgResult<Array1<F>>;
fn nrows(&self) -> usize;
fn ncols(&self) -> usize;
// Provided methods
fn is_symmetric(&self) -> bool { ... }
fn is_positive_definite(&self) -> bool { ... }
}
Expand description
A trait for types that represent matrix-free linear operations
This trait abstracts the concept of a linear operator that maps vectors from one space to another, without explicitly storing a matrix.
Required Methods§
Sourcefn apply(&self, x: &ArrayView1<'_, F>) -> LinalgResult<Array1<F>>
fn apply(&self, x: &ArrayView1<'_, F>) -> LinalgResult<Array1<F>>
Apply the linear operator to a vector
Provided Methods§
Sourcefn is_symmetric(&self) -> bool
fn is_symmetric(&self) -> bool
Check if the linear operator is symmetric
Sourcefn is_positive_definite(&self) -> bool
fn is_positive_definite(&self) -> bool
Check if the linear operator is positive definite