Struct nalgebra::linalg::Bidiagonal
source · pub struct Bidiagonal<N: Real, R: DimMin<C>, C: Dim>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,{
pub diagonal: VectorN<N, DimMinimum<R, C>>,
pub off_diagonal: VectorN<N, DimDiff<DimMinimum<R, C>, U1>>,
/* private fields */
}
Expand description
The bidiagonalization of a general matrix.
Fields§
§diagonal: VectorN<N, DimMinimum<R, C>>
The diagonal elements of the decomposed matrix.
off_diagonal: VectorN<N, DimDiff<DimMinimum<R, C>, U1>>
The off-diagonal elements of the decomposed matrix.
Implementations§
source§impl<N: Real, R: DimMin<C>, C: Dim> Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, C> + Allocator<N, R> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
impl<N: Real, R: DimMin<C>, C: Dim> Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, C> + Allocator<N, R> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
sourcepub fn new(matrix: MatrixMN<N, R, C>) -> Self
pub fn new(matrix: MatrixMN<N, R, C>) -> Self
Computes the Bidiagonal decomposition using householder reflections.
sourcepub fn is_upper_diagonal(&self) -> bool
pub fn is_upper_diagonal(&self) -> bool
Indicates whether this decomposition contains an upper-diagonal matrix.
sourcepub fn unpack(
self
) -> (MatrixMN<N, R, DimMinimum<R, C>>, MatrixN<N, DimMinimum<R, C>>, MatrixMN<N, DimMinimum<R, C>, C>)where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, DimMinimum<R, C>> + Allocator<N, R, DimMinimum<R, C>> + Allocator<N, DimMinimum<R, C>, C>,
DimMinimum<R, C>: DimMin<DimMinimum<R, C>, Output = DimMinimum<R, C>>,
ShapeConstraint: DimEq<Dynamic, DimDiff<DimMinimum<R, C>, U1>>,
pub fn unpack(
self
) -> (MatrixMN<N, R, DimMinimum<R, C>>, MatrixN<N, DimMinimum<R, C>>, MatrixMN<N, DimMinimum<R, C>, C>)where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, DimMinimum<R, C>> + Allocator<N, R, DimMinimum<R, C>> + Allocator<N, DimMinimum<R, C>, C>,
DimMinimum<R, C>: DimMin<DimMinimum<R, C>, Output = DimMinimum<R, C>>,
ShapeConstraint: DimEq<Dynamic, DimDiff<DimMinimum<R, C>, U1>>,
Unpacks this decomposition into its three matrix factors (U, D, V^t)
.
The decomposed matrix M
is equal to U * D * V^t
.
sourcepub fn d(&self) -> MatrixN<N, DimMinimum<R, C>>where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, DimMinimum<R, C>>,
DimMinimum<R, C>: DimMin<DimMinimum<R, C>, Output = DimMinimum<R, C>>,
ShapeConstraint: DimEq<Dynamic, DimDiff<DimMinimum<R, C>, U1>>,
pub fn d(&self) -> MatrixN<N, DimMinimum<R, C>>where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, DimMinimum<R, C>>,
DimMinimum<R, C>: DimMin<DimMinimum<R, C>, Output = DimMinimum<R, C>>,
ShapeConstraint: DimEq<Dynamic, DimDiff<DimMinimum<R, C>, U1>>,
Retrieves the upper trapezoidal submatrix R
of this decomposition.
sourcepub fn u(&self) -> MatrixMN<N, R, DimMinimum<R, C>>where
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>>,
pub fn u(&self) -> MatrixMN<N, R, DimMinimum<R, C>>where
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>>,
Computes the orthogonal matrix U
of this U * D * V
decomposition.
sourcepub fn v_t(&self) -> MatrixMN<N, DimMinimum<R, C>, C>where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, C>,
pub fn v_t(&self) -> MatrixMN<N, DimMinimum<R, C>, C>where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, C>,
Computes the orthogonal matrix V
of this U * D * V
decomposition.
sourcepub fn diagonal(&self) -> &VectorN<N, DimMinimum<R, C>>
pub fn diagonal(&self) -> &VectorN<N, DimMinimum<R, C>>
The diagonal part of this decomposed matrix.
sourcepub fn off_diagonal(&self) -> &VectorN<N, DimDiff<DimMinimum<R, C>, U1>>
pub fn off_diagonal(&self) -> &VectorN<N, DimDiff<DimMinimum<R, C>, U1>>
The off-diagonal part of this decomposed matrix.
Trait Implementations§
source§impl<N: Clone + Real, R: Clone + DimMin<C>, C: Clone + Dim> Clone for Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
impl<N: Clone + Real, R: Clone + DimMin<C>, C: Clone + Dim> Clone for Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
source§fn clone(&self) -> Bidiagonal<N, R, C>
fn clone(&self) -> Bidiagonal<N, R, C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N: Debug + Real, R: Debug + DimMin<C>, C: Debug + Dim> Debug for Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
impl<N: Debug + Real, R: Debug + DimMin<C>, C: Debug + Dim> Debug for Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
impl<N: Real, R: DimMin<C>, C: Dim> Copy for Bidiagonal<N, R, C>where
DimMinimum<R, C>: DimSub<U1>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, DimDiff<DimMinimum<R, C>, U1>>,
MatrixMN<N, R, C>: Copy,
VectorN<N, DimMinimum<R, C>>: Copy,
VectorN<N, DimDiff<DimMinimum<R, C>, U1>>: Copy,
Auto Trait Implementations§
impl<N, R, C> !RefUnwindSafe for Bidiagonal<N, R, C>
impl<N, R, C> !Send for Bidiagonal<N, R, C>
impl<N, R, C> !Sync for Bidiagonal<N, R, C>
impl<N, R, C> !Unpin for Bidiagonal<N, R, C>
impl<N, R, C> !UnwindSafe for Bidiagonal<N, R, C>
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.