Trait wee_matrix::Solve [] [src]

pub trait Solve {
    type Rhs;
    type Output;
    fn solve(&self, b: &Self::Rhs) -> Result<Self::Output, Error>;
fn solve_exact(&self, b: &Self::Rhs) -> Result<Self::Output, Error>;
fn solve_symm(&self, b: &Self::Rhs) -> Result<Self::Output, Error>;
fn solve_approx(
        &self,
        b: &Self::Rhs
    ) -> Result<ApproxSoln<Self::Output>, Error>;
fn inverse(&self) -> Result<Self::Output, Error>; }

Trait to provide various solver implementations for systems of equations AX=B.

Associated Types

The right-hand side type (the type of B in the equation AX=B)

The output (solution) type (the type of X in the equation AX=B)

Required Methods

Solve the equation AX=B for X. Solution can either be exact (if possible) or approximate. Shortcut for calling solve_exact or solve_approx.

Solve the equation AX=B for the exact solution X

Failures

Fails if no exact solution is possible for AX=B or the equation is improperly defined.

Solve the equation AX=B for the exact solution X. Assumes A is a symmetric matrix. Only the upper-triangular portion of A is considered; no failure occurs if A is not symmetric.

Failures

Fails if no exact solution is possible for AX=B orthe equation is improperly defined.

Solve the equation AX=B for the approximate solution X.

Failures

Fails if no approximate solution is possible for AX=B or the equation is improperly defined.

Compute the inverse of A.

Failures

Fails if the matrix is not invertible.

Implementors