LU

Trait LU 

Source
pub trait LU<T> {
    // Required methods
    fn lu_overwrite<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>(
        &self,
        a: &mut DSlice<T, 2, L>,
        l: &mut DSlice<T, 2, Ll>,
        u: &mut DSlice<T, 2, Lu>,
        p: &mut DSlice<T, 2, Lp>,
    );
    fn lu<L: Layout>(
        &self,
        a: &mut DSlice<T, 2, L>,
    ) -> (DTensor<T, 2>, DTensor<T, 2>, DTensor<T, 2>);
    fn inv_overwrite<L: Layout>(
        &self,
        a: &mut DSlice<T, 2, L>,
    ) -> Result<(), InvError>;
    fn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>;
    fn det<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> T;
    fn choleski<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>;
    fn choleski_overwrite<L: Layout>(
        &self,
        a: &mut DSlice<T, 2, L>,
    ) -> Result<(), InvError>;
}
Expand description

LU decomposition and matrix inversion

Required Methods§

Source

fn lu_overwrite<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>( &self, a: &mut DSlice<T, 2, L>, l: &mut DSlice<T, 2, Ll>, u: &mut DSlice<T, 2, Lu>, p: &mut DSlice<T, 2, Lp>, )

Computes LU decomposition overwriting existing matrices

Source

fn lu<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> (DTensor<T, 2>, DTensor<T, 2>, DTensor<T, 2>)

Computes LU decomposition with new allocated matrices: L, U, P (permutation matrix)

Source

fn inv_overwrite<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<(), InvError>

Computes inverse overwriting the input matrix

Source

fn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>

Computes inverse with new allocated matrix

Source

fn det<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> T

Computes the determinant of a square matrix. Panics if the matrix is non-square.

Source

fn choleski<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>

Computes the Cholesky decomposition, returning a lower-triangular matrix

Source

fn choleski_overwrite<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<(), InvError>

Computes the Cholesky decomposition in-place, overwriting the input matrix

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§