Skip to main content

Solver

Trait Solver 

Source
pub trait Solver {
    // Required methods
    fn solve(&self, b: &[f32]) -> Result<Vec<f32>, SolverError>;
    fn dimension(&self) -> usize;
}
Expand description

Unified solver trait for factorization-based linear system solving.

Implemented by LuFactorization, QrFactorization, and CholeskyFactorization.

Required Methods§

Source

fn solve(&self, b: &[f32]) -> Result<Vec<f32>, SolverError>

Solve Ax = b using this factorization.

§Errors

Returns error on dimension mismatch or singular matrix.

Source

fn dimension(&self) -> usize

Matrix dimension (n for n×n systems, or min(m,n) for rectangular).

Implementors§