![]() |
Reference documentation for deal.II version 9.4.2
|
#include <deal.II/lac/qr.h>
Public Types | |
| using | Number = typename VectorType::value_type |
Public Member Functions | |
| QR () | |
| virtual | ~QR ()=default |
| virtual bool | append_column (const VectorType &column) |
| virtual void | remove_column (const unsigned int k=0) |
| virtual void | multiply_with_Q (VectorType &y, const Vector< Number > &x) const |
| virtual void | multiply_with_QT (Vector< Number > &y, const VectorType &x) const |
| virtual void | multiply_with_A (VectorType &y, const Vector< Number > &x) const |
| virtual void | multiply_with_AT (Vector< Number > &y, const VectorType &x) const |
| unsigned int | size () const |
| const LAPACKFullMatrix< Number > & | get_R () const |
| void | solve (Vector< Number > &x, const Vector< Number > &y, const bool transpose=false) const |
| boost::signals2::connection | connect_givens_slot (const std::function< void(const unsigned int i, const unsigned int j, const std::array< Number, 3 > &csr)> &slot) |
Protected Member Functions | |
| void | multiply_with_cols (VectorType &y, const Vector< Number > &x) const |
| void | multiply_with_colsT (Vector< Number > &y, const VectorType &x) const |
Protected Attributes | |
| std::vector< std::unique_ptr< VectorType > > | columns |
| LAPACKFullMatrix< Number > | R |
| unsigned int | current_size |
| boost::signals2::signal< void(const unsigned int i, const unsigned int j, const std::array< Number, 3 > &)> | givens_signal |
Private Member Functions | |
| void | apply_givens_rotation (const unsigned int i, const unsigned int k) |
Private Attributes | |
| VectorType | tmp |
A class to compute and store the QR factorization of a matrix represented by a set of column vectors.
The class is design to update a given (possibly empty) QR factorization of a matrix 

The VectorType template argument may either be a parallel and serial vector, and only need to have basic operations such as additions, scalar product, etc. It also needs to have a copy-constructor.
See sections 6.5.2-6.5.3 on pp. 335-338 in
as well as
| using QR< VectorType >::Number = typename VectorType::value_type |
|
virtual |
Append column to the QR factorization. Returns true if the result is successful, i.e. the columns are linearly independent. Otherwise the column is rejected and the return value is false.
true. Implements BaseQR< VectorType >.
|
virtual |
Remove first column and update QR factorization.
Starting from the given QR decomposition ![$QR= A = [a_1\,\dots a_n], \quad a_i \in {\mathbb R}^m$](form_1706.png)
![$\tilde Q \tilde R= \tilde A = [a_2\,\dots a_n], \quad a_i \in {\mathbb
R}^m$](form_1707.png)
The standard approach is to partition 
![\[
R =
\begin{bmatrix}
r_{11} & w^T \\
0 & R_{33}
\end{bmatrix}
\]](form_1708.png)
It then follows that
![\[
Q^T \tilde A =
\begin{bmatrix}
0 & w^T \\
0 & R_{33}
\end{bmatrix}
\]](form_1709.png)
is upper Hessenberg where unwanted sub-diagonal elements can be zeroed by a sequence of Givens rotations.
Note that 


Implements BaseQR< VectorType >.
|
virtual |
Set 

Implements BaseQR< VectorType >.
|
virtual |
Set 

Implements BaseQR< VectorType >.
|
virtual |
Set 

Implements BaseQR< VectorType >.
|
virtual |
Set 

Implements BaseQR< VectorType >.
|
private |
Apply givens rotation in the (i,j)-plane to Q and R so that R(k,k) is zeroed.
See Chapter 5.1.9 of Golub 2013, Matrix computations.
Return size of the subspace.
|
inherited |
Return the current upper triangular matrix R.
|
inherited |
Solve 
x and y should be consistent with the current size of the subspace. If transpose is true, 
|
inherited |
Connect a slot to retrieve a notification when the Givens rotations are performed.
The function takes two indices, i and j, describing the plane of rotation, and a triplet of numbers csr (cosine, sine and radius, see Utilities::LinearAlgebra::givens_rotation()) which represents the rotation matrix.
|
protectedinherited |
Compute 

|
protectedinherited |
Multiply with transpose columns stored in the object.
|
private |
|
protectedinherited |
|
protectedinherited |