Skip to main content

LinearOperator

Trait LinearOperator 

Source
pub trait LinearOperator {
    // Required methods
    fn dimension(&self) -> usize;
    fn apply(&self, x: &[f64], output: &mut [f64]) -> Result<(), SolverError>;
}
Expand description

Synchronous HOST linear map. Implementations must fully overwrite output, preserve inputs and implement a fixed linear map throughout one solve. Device-resident asynchronous algorithms will use a separate API, not hidden copies.

Required Methods§

Source

fn dimension(&self) -> usize

Source

fn apply(&self, x: &[f64], output: &mut [f64]) -> Result<(), SolverError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§