pub trait SVD<T> {
// Required methods
fn svd<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> SVDResult<T>;
fn svd_s<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<DTensor<T, 2>, SVDError>;
fn svd_overwrite<L: Layout, Ls: Layout, Lu: Layout, Lvt: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
s: &mut DSlice<T, 2, Ls>,
u: &mut DSlice<T, 2, Lu>,
vt: &mut DSlice<T, 2, Lvt>,
) -> Result<(), SVDError>;
fn svd_overwrite_s<L: Layout, Ls: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
s: &mut DSlice<T, 2, Ls>,
) -> Result<(), SVDError>;
}Expand description
Singular value decomposition for matrix factorization and analysis
Required Methods§
Sourcefn svd<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> SVDResult<T>
fn svd<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> SVDResult<T>
Compute full SVD with new allocated matrices
Sourcefn svd_s<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<DTensor<T, 2>, SVDError>
fn svd_s<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<DTensor<T, 2>, SVDError>
Compute only singular values with new allocated matrix
Sourcefn svd_overwrite<L: Layout, Ls: Layout, Lu: Layout, Lvt: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
s: &mut DSlice<T, 2, Ls>,
u: &mut DSlice<T, 2, Lu>,
vt: &mut DSlice<T, 2, Lvt>,
) -> Result<(), SVDError>
fn svd_overwrite<L: Layout, Ls: Layout, Lu: Layout, Lvt: Layout>( &self, a: &mut DSlice<T, 2, L>, s: &mut DSlice<T, 2, Ls>, u: &mut DSlice<T, 2, Lu>, vt: &mut DSlice<T, 2, Lvt>, ) -> Result<(), SVDError>
Compute full SVD, overwriting existing matrices The matrix A is decomposed as A = U * S * V^T where:
scontains the singular values (diagonal matrix S)ucontains the left singular vectors (matrix U)vtcontains the transposed right singular vectors (matrix V^T)
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.