Skip to main content

SparseSolver

Trait SparseSolver 

Source
pub trait SparseSolver<F: Float> {
    // Required methods
    fn factorize(&mut self, matrix: &CsrMatrix<F>) -> SparseResult<()>;
    fn solve(&self, b: &[F]) -> SparseResult<Vec<F>>;

    // Provided method
    fn solve_multi(&self, b_columns: &[Vec<F>]) -> SparseResult<Vec<Vec<F>>> { ... }
}
Expand description

Trait for sparse direct solvers.

A solver follows the factorize-then-solve paradigm:

  1. Call factorize() to compute the decomposition.
  2. Call solve() (or solve_multi()) one or more times.

Required Methods§

Source

fn factorize(&mut self, matrix: &CsrMatrix<F>) -> SparseResult<()>

Compute the factorization of the given matrix.

Source

fn solve(&self, b: &[F]) -> SparseResult<Vec<F>>

Solve A x = b using the stored factorization.

Provided Methods§

Source

fn solve_multi(&self, b_columns: &[Vec<F>]) -> SparseResult<Vec<Vec<F>>>

Solve A X = B for multiple right-hand sides (columns of B).

Implementors§