Fields
s: Vec<f64>
u: Matrix
vt: Matrix
Implementations
sourceimpl SVD
impl SVD
pub fn u(&self) -> &Matrix
pub fn vt(&self) -> &Matrix
pub fn s_mat(&self) -> Matrix
sourcepub fn truncated(&self) -> Self
pub fn truncated(&self) -> Self
Generated Truncated SVD
extern crate peroxide;
use peroxide::fuga::*;
fn main() {
let x = ml_matrix("1 2 3;4 5 6");
// Full SVD
let svd = x.svd();
svd.u().print(); // m x m matrix
svd.s_mat().print(); // m x n matrix
svd.vt().print(); // n x n matrix
// Truncated SVD
let svd2 = svd.truncated();
svd2.u().print(); // m x p matrix
svd2.s_mat().print(); // p x p matrix
svd2.vt().print(); // p x n matrix
}
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SVD
impl Send for SVD
impl Sync for SVD
impl Unpin for SVD
impl UnwindSafe for SVD
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more