pub trait LU<T, D0: Dim, D1: Dim> {
// Required methods
fn lu_write<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
l: &mut Slice<T, (D0, D0), Ll>,
u: &mut Slice<T, (D0, D1), Lu>,
p: &mut Slice<T, (D0, D0), Lp>,
);
fn lu<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> (Array<T, (D0, D0)>, Array<T, (D0, D1)>, Array<T, (D0, D0)>);
fn inv_write<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<(), InvError>;
fn inv<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<Array<T, (D0, D1)>, InvError>;
fn det<L: Layout>(&self, a: &mut Slice<T, (D0, D1), L>) -> T;
fn cholesky<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<Array<T, (D0, D1)>, InvError>;
fn cholesky_write<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<(), InvError>;
}Expand description
LU decomposition and matrix inversion
Required Methods§
Sourcefn lu_write<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
l: &mut Slice<T, (D0, D0), Ll>,
u: &mut Slice<T, (D0, D1), Lu>,
p: &mut Slice<T, (D0, D0), Lp>,
)
fn lu_write<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>( &self, a: &mut Slice<T, (D0, D1), L>, l: &mut Slice<T, (D0, D0), Ll>, u: &mut Slice<T, (D0, D1), Lu>, p: &mut Slice<T, (D0, D0), Lp>, )
Computes LU decomposition overwriting existing matrices
Sourcefn lu<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> (Array<T, (D0, D0)>, Array<T, (D0, D1)>, Array<T, (D0, D0)>)
fn lu<L: Layout>( &self, a: &mut Slice<T, (D0, D1), L>, ) -> (Array<T, (D0, D0)>, Array<T, (D0, D1)>, Array<T, (D0, D0)>)
Computes LU decomposition with new allocated matrices: L, U, P (permutation matrix)
Sourcefn inv_write<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<(), InvError>
fn inv_write<L: Layout>( &self, a: &mut Slice<T, (D0, D1), L>, ) -> Result<(), InvError>
Computes inverse overwriting the input matrix
Sourcefn inv<L: Layout>(
&self,
a: &mut Slice<T, (D0, D1), L>,
) -> Result<Array<T, (D0, D1)>, InvError>
fn inv<L: Layout>( &self, a: &mut Slice<T, (D0, D1), L>, ) -> Result<Array<T, (D0, D1)>, InvError>
Computes inverse with new allocated matrix
Sourcefn det<L: Layout>(&self, a: &mut Slice<T, (D0, D1), L>) -> T
fn det<L: Layout>(&self, a: &mut Slice<T, (D0, D1), L>) -> T
Computes the determinant of a square matrix. Panics if the matrix is non-square.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".