Struct rin::math::QR [−][src]
pub struct QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>, { /* fields omitted */ }
The QR decomposition of a general matrix.
Implementations
impl<N, R, C> QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, R, U1>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]
impl<N, R, C> QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, R, U1>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]pub fn new(
matrix: Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
) -> QR<N, R, C>
[src]
matrix: Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
) -> QR<N, R, C>
Computes the QR decomposition using householder reflections.
pub fn r(
&self
) -> Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer> where
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, C>,
[src]
&self
) -> Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer> where
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, C>,
Retrieves the upper trapezoidal submatrix R
of this decomposition.
pub fn unpack_r(
self
) -> Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer> where
DefaultAllocator: Reallocator<N, R, C, <R as DimMin<C>>::Output, C>,
[src]
self
) -> Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer> where
DefaultAllocator: Reallocator<N, R, C, <R as DimMin<C>>::Output, C>,
Retrieves the upper trapezoidal submatrix R
of this decomposition.
This is usually faster than r
but consumes self
.
pub fn q(
&self
) -> Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer> where
DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>,
[src]
&self
) -> Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer> where
DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>,
Computes the orthogonal matrix Q
of this decomposition.
pub fn unpack(
self
) -> (Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer>, Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer>) where
<R as DimMin<C>>::Output: DimMin<C>,
DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>,
DefaultAllocator: Reallocator<N, R, C, <R as DimMin<C>>::Output, C>,
<<R as DimMin<C>>::Output as DimMin<C>>::Output == <R as DimMin<C>>::Output,
[src]
self
) -> (Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer>, Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer>) where
<R as DimMin<C>>::Output: DimMin<C>,
DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>,
DefaultAllocator: Reallocator<N, R, C, <R as DimMin<C>>::Output, C>,
<<R as DimMin<C>>::Output as DimMin<C>>::Output == <R as DimMin<C>>::Output,
Unpacks this decomposition into its two matrix factors.
pub fn q_tr_mul<R2, C2, S2>(&self, rhs: &mut Matrix<N, R2, C2, S2>) where
C2: Dim,
R2: Dim,
S2: StorageMut<N, R2, C2>,
[src]
C2: Dim,
R2: Dim,
S2: StorageMut<N, R2, C2>,
Multiplies the provided matrix by the transpose of the Q
matrix of this decomposition.
impl<N, D> QR<N, D, D> where
N: ComplexField,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<N, D, D>,
DefaultAllocator: Allocator<N, D, U1>,
[src]
impl<N, D> QR<N, D, D> where
N: ComplexField,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<N, D, D>,
DefaultAllocator: Allocator<N, D, U1>,
[src]pub fn solve<R2, C2, S2>(
&self,
b: &Matrix<N, R2, C2, S2>
) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>> where
C2: Dim,
R2: Dim,
S2: Storage<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
DefaultAllocator: Allocator<N, R2, C2>,
[src]
&self,
b: &Matrix<N, R2, C2, S2>
) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>> where
C2: Dim,
R2: Dim,
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, C2, S2>(&self, b: &mut Matrix<N, R2, C2, S2>) -> bool where
C2: Dim,
R2: Dim,
S2: StorageMut<N, R2, C2>,
ShapeConstraint: SameNumberOfRows<R2, D>,
[src]
C2: Dim,
R2: Dim,
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<Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer>>
[src]
&self
) -> Option<Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer>>
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, R, C> Clone for QR<N, R, C> where
C: Clone + Dim,
N: Clone + ComplexField,
R: Clone + DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]
impl<N, R, C> Clone for QR<N, R, C> where
C: Clone + Dim,
N: Clone + ComplexField,
R: Clone + DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]impl<N, R, C> Debug for QR<N, R, C> where
C: Debug + Dim,
N: Debug + ComplexField,
R: Debug + DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]
impl<N, R, C> Debug for QR<N, R, C> where
C: Debug + Dim,
N: Debug + ComplexField,
R: Debug + DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
[src]impl<'de, N, R, C> Deserialize<'de> for QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Deserialize<'de>,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: Deserialize<'de>,
[src]
impl<'de, N, R, C> Deserialize<'de> for QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Deserialize<'de>,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: Deserialize<'de>,
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<QR<N, R, C>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<QR<N, R, C>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<N, R, C> Serialize for QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Serialize,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: Serialize,
[src]
impl<N, R, C> Serialize for QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Serialize,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: Serialize,
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<N, R, C> Copy for QR<N, R, C> where
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Copy,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: Copy,
[src]
C: Dim,
N: ComplexField,
R: DimMin<C>,
DefaultAllocator: Allocator<N, R, C>,
DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, U1>,
Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Copy,
Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, U1>>::Buffer>: 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]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]