pub trait SVD<T, D: Dim> {
type SingularValue;
// Required methods
fn svd<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>;
fn svd_thin<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>;
fn svd_s<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<Array<Self::SingularValue, (D,)>, SVDError>;
fn svd_write<L: Layout, Ls: Layout, Lu: Layout, Lvt: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
s: &mut Slice<Self::SingularValue, (D,), Ls>,
u: &mut Slice<T, (D, D), Lu>,
vt: &mut Slice<T, (D, D), Lvt>,
) -> Result<(), SVDError>;
fn svd_write_s<L: Layout, Ls: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
s: &mut Slice<Self::SingularValue, (D,), Ls>,
) -> Result<(), SVDError>;
}Expand description
Singular value decomposition for matrix factorization and analysis
Required Associated Types§
Sourcetype SingularValue
type SingularValue
Scalar type used for singular values.
Singular values are mathematically real. Backends choose their
representation; some current backends use the matrix scalar type T.
Required Methods§
Sourcefn svd<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>
fn svd<L: Layout>( &self, a: &mut Slice<T, (D, D), L>, ) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>
Compute full SVD with new allocated matrices
Sourcefn svd_thin<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>
fn svd_thin<L: Layout>( &self, a: &mut Slice<T, (D, D), L>, ) -> Result<SVDDecomp<T, Self::SingularValue, D>, SVDError>
Compute thin SVD with new allocated matrices
Sourcefn svd_s<L: Layout>(
&self,
a: &mut Slice<T, (D, D), L>,
) -> Result<Array<Self::SingularValue, (D,)>, SVDError>
fn svd_s<L: Layout>( &self, a: &mut Slice<T, (D, D), L>, ) -> Result<Array<Self::SingularValue, (D,)>, SVDError>
Compute only singular values with new allocated matrix
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".