template<typename Scalar = double>
class Spectra::UpperHessenbergQR< Scalar >
Perform the QR decomposition of an upper Hessenberg matrix.
- Template Parameters
-
| Scalar | The element type of the matrix. Currently supported types are float, double and long double. |
#include <UpperHessenbergQR.h>
|
| | UpperHessenbergQR (Index size) |
| | Constructor to preallocate memory. More...
|
| |
| | UpperHessenbergQR (ConstGenericMatrix &mat, const Scalar &shift=Scalar(0)) |
| | Constructor to create an object that performs and stores the QR decomposition of an upper Hessenberg matrix mat, with an optional shift: \(H-sI=QR\). More...
|
| |
|
virtual | ~UpperHessenbergQR () |
| | Virtual destructor.
|
| |
| virtual void | compute (ConstGenericMatrix &mat, const Scalar &shift=Scalar(0)) |
| | Compute the QR decomposition of an upper Hessenberg matrix with an optional shift. More...
|
| |
| virtual Matrix | matrix_R () const |
| | Return the \(R\) matrix in the QR decomposition, which is an upper triangular matrix. More...
|
| |
| virtual void | matrix_QtHQ (Matrix &dest) const |
| | Overwrite dest with \(Q^H H Q = RQ + sI\), where \(H\) is the input matrix mat, and \(s\) is the shift. More...
|
| |
| void | apply_QY (Vector &Y) const |
| | Apply the \(Q\) matrix to a vector \(y\). More...
|
| |
| void | apply_QtY (Vector &Y) const |
| | Apply the \(Q\) matrix to a vector \(y\). More...
|
| |
| void | apply_QY (GenericMatrix Y) const |
| | Apply the \(Q\) matrix to another matrix \(Y\). More...
|
| |
| void | apply_QtY (GenericMatrix Y) const |
| | Apply the \(Q\) matrix to another matrix \(Y\). More...
|
| |
| void | apply_YQ (GenericMatrix Y) const |
| | Apply the \(Q\) matrix to another matrix \(Y\). More...
|
| |
| void | apply_YQt (GenericMatrix Y) const |
| | Apply the \(Q\) matrix to another matrix \(Y\). More...
|
| |
|
|
Index | m_n |
| |
|
Scalar | m_shift |
| |
|
RealArray | m_rot_cos |
| |
|
Array | m_rot_sin |
| |
|
bool | m_computed |
| |
◆ UpperHessenbergQR() [1/2]
template<typename Scalar = double>
Constructor to preallocate memory.
Computation can be performed later by calling the compute() method.
◆ UpperHessenbergQR() [2/2]
template<typename Scalar = double>
Constructor to create an object that performs and stores the QR decomposition of an upper Hessenberg matrix mat, with an optional shift: \(H-sI=QR\).
Here \(H\) stands for the matrix mat, and \(s\) is the shift.
- Parameters
-
| mat | Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>). Only the upper triangular and the subdiagonal elements of the matrix are used. |
◆ apply_QtY() [1/2]
template<typename Scalar = double>
Apply the \(Q\) matrix to another matrix \(Y\).
- Parameters
-
| Y | A matrix that will be overwritten by the matrix product \(Q'Y\). |
Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).
◆ apply_QtY() [2/2]
template<typename Scalar = double>
Apply the \(Q\) matrix to a vector \(y\).
- Parameters
-
| Y | A vector that will be overwritten by the matrix product \(Q'y\). |
Vector type can be Eigen::Vector<Scalar, ...>, depending on the template parameter Scalar defined.
◆ apply_QY() [1/2]
template<typename Scalar = double>
Apply the \(Q\) matrix to another matrix \(Y\).
- Parameters
-
| Y | A matrix that will be overwritten by the matrix product \(QY\). |
Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).
◆ apply_QY() [2/2]
template<typename Scalar = double>
Apply the \(Q\) matrix to a vector \(y\).
- Parameters
-
| Y | A vector that will be overwritten by the matrix product \(Qy\). |
Vector type can be Eigen::Vector<Scalar, ...>, depending on the template parameter Scalar defined.
◆ apply_YQ()
template<typename Scalar = double>
Apply the \(Q\) matrix to another matrix \(Y\).
- Parameters
-
| Y | A matrix that will be overwritten by the matrix product \(YQ\). |
Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).
◆ apply_YQt()
template<typename Scalar = double>
Apply the \(Q\) matrix to another matrix \(Y\).
- Parameters
-
| Y | A matrix that will be overwritten by the matrix product \(YQ'\). |
Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>).
◆ compute()
template<typename Scalar = double>
Compute the QR decomposition of an upper Hessenberg matrix with an optional shift.
- Parameters
-
| mat | Matrix type can be Eigen::Matrix<Scalar, ...> (e.g. Eigen::MatrixXd and Eigen::MatrixXf), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>). Only the upper triangular and the subdiagonal elements of the matrix are used. |
◆ matrix_QtHQ()
template<typename Scalar = double>
Overwrite dest with \(Q^H H Q = RQ + sI\), where \(H\) is the input matrix mat, and \(s\) is the shift.
The result is an upper Hessenberg matrix.
- Parameters
-
| mat | The matrix to be overwritten, whose type should be Eigen::Matrix<Scalar, ...>, depending on the template parameter Scalar defined. |
◆ matrix_R()
template<typename Scalar = double>
Return the \(R\) matrix in the QR decomposition, which is an upper triangular matrix.
- Returns
- Returned matrix type will be
Eigen::Matrix<Scalar, ...>, depending on the template parameter Scalar defined.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_thirdparty/spectra/Spectra/LinAlg/UpperHessenbergQR.h