Struct nalgebra::linalg::QR [−][src]
pub struct QR<N: ComplexField, R: DimMin<C>, C: Dim> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>, { /* fields omitted */ }
The QR decomposition of a general matrix.
Implementations
impl<N: ComplexField, R: DimMin<C>, C: Dim> QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, R> + Allocator<N, DimMinimum<R, C>>,
[src]
impl<N: ComplexField, R: DimMin<C>, C: Dim> QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, R> + Allocator<N, DimMinimum<R, C>>,
[src]pub fn new(matrix: MatrixMN<N, R, C>) -> Self
[src]
Computes the QR decomposition using householder reflections.
pub fn r(&self) -> MatrixMN<N, DimMinimum<R, C>, C> where
DefaultAllocator: Allocator<N, DimMinimum<R, C>, C>,
[src]
DefaultAllocator: Allocator<N, DimMinimum<R, C>, C>,
Retrieves the upper trapezoidal submatrix R
of this decomposition.
pub fn unpack_r(self) -> MatrixMN<N, DimMinimum<R, C>, C> where
DefaultAllocator: Reallocator<N, R, C, DimMinimum<R, C>, C>,
[src]
DefaultAllocator: Reallocator<N, R, C, DimMinimum<R, C>, C>,
Retrieves the upper trapezoidal submatrix R
of this decomposition.
This is usually faster than r
but consumes self
.
pub fn q(&self) -> MatrixMN<N, R, DimMinimum<R, C>> where
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>>,
[src]
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>>,
Computes the orthogonal matrix Q
of this decomposition.
pub fn unpack(
self
) -> (MatrixMN<N, R, DimMinimum<R, C>>, MatrixMN<N, DimMinimum<R, C>, C>) where
DimMinimum<R, C>: DimMin<C, Output = DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>> + Reallocator<N, R, C, DimMinimum<R, C>, C>,
[src]
self
) -> (MatrixMN<N, R, DimMinimum<R, C>>, MatrixMN<N, DimMinimum<R, C>, C>) where
DimMinimum<R, C>: DimMin<C, Output = DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, DimMinimum<R, C>> + Reallocator<N, R, C, DimMinimum<R, C>, C>,
Unpacks this decomposition into its two matrix factors.
pub fn q_tr_mul<R2: Dim, C2: Dim, S2>(&self, rhs: &mut Matrix<N, R2, C2, S2>) where
S2: StorageMut<N, R2, C2>,
[src]
S2: StorageMut<N, R2, C2>,
Multiplies the provided matrix by the transpose of the Q
matrix of this decomposition.
impl<N: ComplexField, D: DimMin<D, Output = D>> QR<N, D, D> where
DefaultAllocator: Allocator<N, D, D> + Allocator<N, D>,
[src]
impl<N: ComplexField, D: DimMin<D, Output = D>> QR<N, D, D> where
DefaultAllocator: Allocator<N, D, D> + Allocator<N, D>,
[src]pub fn solve<R2: Dim, C2: Dim, S2>(
&self,
b: &Matrix<N, R2, C2, S2>
) -> Option<MatrixMN<N, R2, C2>> where
S2: Storage<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
DefaultAllocator: Allocator<N, R2, C2>,
[src]
&self,
b: &Matrix<N, R2, C2, S2>
) -> Option<MatrixMN<N, R2, C2>> where
S2: Storage<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
DefaultAllocator: Allocator<N, R2, C2>,
Solves the linear system self * x = b
, where x
is the unknown to be determined.
Returns None
if self
is not invertible.
pub fn solve_mut<R2: Dim, C2: Dim, S2>(
&self,
b: &mut Matrix<N, R2, C2, S2>
) -> bool where
S2: StorageMut<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
[src]
&self,
b: &mut Matrix<N, R2, C2, S2>
) -> bool where
S2: StorageMut<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
Solves the linear system self * x = b
, where x
is the unknown to be determined.
If the decomposed matrix is not invertible, this returns false
and its input b
is
overwritten with garbage.
pub fn try_inverse(&self) -> Option<MatrixN<N, D>>
[src]
Computes the inverse of the decomposed matrix.
Returns None
if the decomposed matrix is not invertible.
pub fn is_invertible(&self) -> bool
[src]
Indicates if the decomposed matrix is invertible.
Trait Implementations
impl<N: Clone + ComplexField, R: Clone + DimMin<C>, C: Clone + Dim> Clone for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
[src]
impl<N: Clone + ComplexField, R: Clone + DimMin<C>, C: Clone + Dim> Clone for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
[src]impl<N: Debug + ComplexField, R: Debug + DimMin<C>, C: Debug + Dim> Debug for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
[src]
impl<N: Debug + ComplexField, R: Debug + DimMin<C>, C: Debug + Dim> Debug for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
[src]impl<'de, N: ComplexField, R: DimMin<C>, C: Dim> Deserialize<'de> for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Deserialize<'de>,
VectorN<N, DimMinimum<R, C>>: Deserialize<'de>,
[src]
impl<'de, N: ComplexField, R: DimMin<C>, C: Dim> Deserialize<'de> for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Deserialize<'de>,
VectorN<N, DimMinimum<R, C>>: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<N: ComplexField, R: DimMin<C>, C: Dim> Serialize for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Serialize,
VectorN<N, DimMinimum<R, C>>: Serialize,
[src]
impl<N: ComplexField, R: DimMin<C>, C: Dim> Serialize for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Serialize,
VectorN<N, DimMinimum<R, C>>: Serialize,
[src]impl<N: ComplexField, R: DimMin<C>, C: Dim> Copy for QR<N, R, C> where
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Copy,
VectorN<N, DimMinimum<R, C>>: Copy,
[src]
DefaultAllocator: Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Copy,
VectorN<N, DimMinimum<R, C>>: Copy,
Auto Trait Implementations
impl<N, R, C> !RefUnwindSafe for QR<N, R, C>
impl<N, R, C> !Send for QR<N, R, C>
impl<N, R, C> !Sync for QR<N, R, C>
impl<N, R, C> !Unpin for QR<N, R, C>
impl<N, R, C> !UnwindSafe for QR<N, R, C>
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]