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§
Sourcefn 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_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
Sourcefn lu<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> (DTensor<T, 2>, DTensor<T, 2>, DTensor<T, 2>)
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)
Sourcefn inv_overwrite<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<(), InvError>
fn inv_overwrite<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<(), InvError>
Computes inverse overwriting the input matrix
Sourcefn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>
fn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>
Computes inverse with new allocated matrix
Sourcefn det<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> T
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.
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.