Solve

Trait Solve 

Source
pub trait Solve<T> {
    // Required methods
    fn solve_overwrite<La: Layout, Lb: Layout, Lp: Layout>(
        &self,
        a: &mut DSlice<T, 2, La>,
        b: &mut DSlice<T, 2, Lb>,
        p: &mut DSlice<T, 2, Lp>,
    ) -> Result<(), SolveError>;
    fn solve<La: Layout, Lb: Layout>(
        &self,
        a: &mut DSlice<T, 2, La>,
        b: &DSlice<T, 2, Lb>,
    ) -> SolveResultType<T>;
}
Expand description

Linear system solver using LU decomposition

Required Methods§

Source

fn solve_overwrite<La: Layout, Lb: Layout, Lp: Layout>( &self, a: &mut DSlice<T, 2, La>, b: &mut DSlice<T, 2, Lb>, p: &mut DSlice<T, 2, Lp>, ) -> Result<(), SolveError>

Solves linear system AX = b overwriting existing matrices A is overwritten with its LU decomposition B is overwritten with the solution X P is filled with the permutation matrix such that A = PLU Returns Ok(()) on success, Err(SolveError) on failure

Source

fn solve<La: Layout, Lb: Layout>( &self, a: &mut DSlice<T, 2, La>, b: &DSlice<T, 2, Lb>, ) -> SolveResultType<T>

Solves linear system AX = B with new allocated solution matrix A is modified (overwritten with LU decomposition) Returns the solution X and P the permutation matrix, or error

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§