pub struct Svd<T: Scalar, U = Vec<T>, S = Vec<<T as Scalar>::Real>> {
pub size: [usize; 2],
pub u: U,
pub s: S,
pub v: U,
/* private fields */
}Expand description
Fields§
§size: [usize; 2]§u: U§s: S§v: UImplementations§
Source§impl<T: Factor, U: AsRef<[T]>, S: AsRef<[T::Real]>> Svd<T, U, S>
impl<T: Factor, U: AsRef<[T]>, S: AsRef<[T::Real]>> Svd<T, U, S>
Sourcepub fn solve(&self, b: &[T], k: usize) -> Vec<T>
pub fn solve(&self, b: &[T], k: usize) -> Vec<T>
The least-squares solution x of a x = b with the least norm, for the factored a and the m×k matrix b, as an n×k matrix. Singular values below ε times the larger of m and n times the largest singular value count as zero, as in NumPy’s lstsq.
Sourcepub fn pseudoinverse(&self) -> Vec<T>
pub fn pseudoinverse(&self) -> Vec<T>
The n×m pseudoinverse of the factored matrix, with the cutoff that solve uses.
Trait Implementations§
impl<T: Copy + Scalar, U: Copy, S: Copy> Copy for Svd<T, U, S>
impl<T: PartialEq + Scalar, U: PartialEq, S: PartialEq> StructuralPartialEq for Svd<T, U, S>
Auto Trait Implementations§
impl<T, U, S> Forget for Svd<T, U, S>
impl<T, U, S> Freeze for Svd<T, U, S>
impl<T, U, S> RefUnwindSafe for Svd<T, U, S>
impl<T, U, S> Send for Svd<T, U, S>
impl<T, U, S> Sync for Svd<T, U, S>
impl<T, U, S> Unpin for Svd<T, U, S>
impl<T, U, S> UnsafeUnpin for Svd<T, U, S>
impl<T, U, S> UnwindSafe for Svd<T, U, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more