#include <UpperHessenbergQR.h>
Public Member Functions | |
void | apply_QtY (Vector &Y) const |
void | apply_QtY (GenericMatrix Y) const |
void | apply_QY (Vector &Y) const |
void | apply_QY (GenericMatrix Y) const |
void | apply_YQ (GenericMatrix Y) const |
void | apply_YQt (GenericMatrix Y) const |
virtual void | compute (ConstGenericMatrix &mat, const Scalar &shift=Scalar(0)) |
virtual void | matrix_QtHQ (Matrix &dest) const |
virtual Matrix | matrix_R () const |
UpperHessenbergQR (Index size) | |
UpperHessenbergQR (ConstGenericMatrix &mat, const Scalar &shift=Scalar(0)) | |
virtual | ~UpperHessenbergQR () |
Static Protected Member Functions | |
static void | compute_rotation (const Scalar &x, const Scalar &y, Scalar &r, Scalar &c, Scalar &s) |
Protected Attributes | |
bool | m_computed |
Index | m_n |
Array | m_rot_cos |
Array | m_rot_sin |
Scalar | m_shift |
Private Types | |
typedef Eigen::Array< Scalar, Eigen::Dynamic, 1 > | Array |
typedef const Eigen::Ref< const Matrix > | ConstGenericMatrix |
typedef Eigen::Ref< Matrix > | GenericMatrix |
typedef Eigen::Index | Index |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > | Matrix |
typedef Eigen::Matrix< Scalar, 1, Eigen::Dynamic > | RowVector |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > | Vector |
Private Attributes | |
Matrix | m_mat_T |
Perform the QR decomposition of an upper Hessenberg matrix.
Scalar | The element type of the matrix. Currently supported types are float , double and long double . |
Definition at line 43 of file UpperHessenbergQR.h.
|
private |
Definition at line 50 of file UpperHessenbergQR.h.
|
private |
Definition at line 53 of file UpperHessenbergQR.h.
|
private |
Definition at line 52 of file UpperHessenbergQR.h.
|
private |
Definition at line 46 of file UpperHessenbergQR.h.
|
private |
Definition at line 47 of file UpperHessenbergQR.h.
|
private |
Definition at line 49 of file UpperHessenbergQR.h.
|
private |
Definition at line 48 of file UpperHessenbergQR.h.
|
inline |
Constructor to preallocate memory. Computation can be performed later by calling the compute() method.
Definition at line 109 of file UpperHessenbergQR.h.
|
inline |
Constructor to create an object that performs and stores the QR decomposition of an upper Hessenberg matrix mat
, with an optional shift: . Here stands for the matrix mat
, and is the shift.
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 lower subdiagonal parts of the matrix are used. |
Definition at line 128 of file UpperHessenbergQR.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 141 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to a vector .
Y | A vector that will be overwritten by the matrix product . |
Vector type can be Eigen::Vector<Scalar, ...>
, depending on the template parameter Scalar
defined.
Definition at line 309 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to another matrix .
Y | A matrix that will be overwritten by the matrix product . |
Matrix type can be Eigen::Matrix<Scalar, ...>
(e.g. Eigen::MatrixXd
and Eigen::MatrixXf
), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>
).
Definition at line 368 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to a vector .
Y | A vector that will be overwritten by the matrix product . |
Vector type can be Eigen::Vector<Scalar, ...>
, depending on the template parameter Scalar
defined.
Definition at line 282 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to another matrix .
Y | A matrix that will be overwritten by the matrix product . |
Matrix type can be Eigen::Matrix<Scalar, ...>
(e.g. Eigen::MatrixXd
and Eigen::MatrixXf
), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>
).
Definition at line 338 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to another matrix .
Y | A matrix that will be overwritten by the matrix product . |
Matrix type can be Eigen::Matrix<Scalar, ...>
(e.g. Eigen::MatrixXd
and Eigen::MatrixXf
), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>
).
Definition at line 399 of file UpperHessenbergQR.h.
|
inline |
Apply the matrix to another matrix .
Y | A matrix that will be overwritten by the matrix product . |
Matrix type can be Eigen::Matrix<Scalar, ...>
(e.g. Eigen::MatrixXd
and Eigen::MatrixXf
), or its mapped version (e.g. Eigen::Map<Eigen::MatrixXd>
).
Definition at line 445 of file UpperHessenbergQR.h.
|
inlinevirtual |
Conduct the QR factorization of an upper Hessenberg matrix with an optional shift.
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 lower subdiagonal parts of the matrix are used. |
Reimplemented in Spectra::TridiagQR< Scalar >.
Definition at line 153 of file UpperHessenbergQR.h.
|
inlinestaticprotected |
Definition at line 70 of file UpperHessenbergQR.h.
|
inlinevirtual |
Overwrite dest
with , where is the input matrix mat
, and is the shift. The result is an upper Hessenberg matrix.
mat | The matrix to be overwritten, whose type should be Eigen::Matrix<Scalar, ...> , depending on the template parameter Scalar defined. |
Reimplemented in Spectra::TridiagQR< Scalar >.
Definition at line 235 of file UpperHessenbergQR.h.
|
inlinevirtual |
Return the matrix in the QR decomposition, which is an upper triangular matrix.
Eigen::Matrix<Scalar, ...>
, depending on the template parameter Scalar
defined. Reimplemented in Spectra::TridiagQR< Scalar >.
Definition at line 220 of file UpperHessenbergQR.h.
|
protected |
Definition at line 65 of file UpperHessenbergQR.h.
|
private |
Definition at line 55 of file UpperHessenbergQR.h.
|
protected |
Definition at line 58 of file UpperHessenbergQR.h.
|
protected |
Definition at line 63 of file UpperHessenbergQR.h.
|
protected |
Definition at line 64 of file UpperHessenbergQR.h.
|
protected |
Definition at line 62 of file UpperHessenbergQR.h.