Skip to main content

LinearOperator

Trait LinearOperator 

Source
pub trait LinearOperator {
    // Required methods
    fn shape(&self) -> (usize, usize);
    fn matvec(&self, x: &[f64]) -> Vec<f64>;
    fn rmatvec(&self, x: &[f64]) -> Vec<f64>;
}
Expand description

A matrix seen only through its products with vectors (SciPy’s LinearOperator).

Required Methods§

Source

fn shape(&self) -> (usize, usize)

(rows, columns).

Source

fn matvec(&self, x: &[f64]) -> Vec<f64>

A x.

Source

fn rmatvec(&self, x: &[f64]) -> Vec<f64>

Aᵀ x (needed by LSQR).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LinearOperator for Array2<f64>

Source§

fn shape(&self) -> (usize, usize)

Source§

fn matvec(&self, x: &[f64]) -> Vec<f64>

Source§

fn rmatvec(&self, x: &[f64]) -> Vec<f64>

Implementors§

Source§

impl LinearOperator for CscMatrix

Source§

impl LinearOperator for CsrMatrix

Source§

impl LinearOperator for Ilu

As a preconditioner, M = (L U)⁻¹.

Source§

impl LinearOperator for IncompleteCholesky

As a preconditioner, M = (L Lᵀ)⁻¹.

Source§

impl LinearOperator for Jacobi

Source§

impl<F: Fn(&[f64]) -> Vec<f64>, G: Fn(&[f64]) -> Vec<f64>> LinearOperator for FnOperator<F, G>