QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TqrEigenDecomposition Class Reference

tridiag. QR eigen decomposition with explicite shift aka Wilkinson More...

#include <ql/math/matrixutilities/tqreigendecomposition.hpp>

+ Collaboration diagram for TqrEigenDecomposition:

Public Types

enum  EigenVectorCalculation { WithEigenVector , WithoutEigenVector , OnlyFirstRowEigenVector }
 
enum  ShiftStrategy { NoShift , Overrelaxation , CloseEigenValue }
 

Public Member Functions

 TqrEigenDecomposition (const Array &diag, const Array &sub, EigenVectorCalculation calc=WithEigenVector, ShiftStrategy strategy=CloseEigenValue)
 
const Arrayeigenvalues () const
 
const Matrixeigenvectors () const
 
Size iterations () const
 

Private Member Functions

bool offDiagIsZero (Size k, Array &e)
 

Private Attributes

Size iter_ = 0
 
Array d_
 
Matrix ev_
 

Detailed Description

tridiag. QR eigen decomposition with explicite shift aka Wilkinson

References:

Wilkinson, J.H. and Reinsch, C. 1971, Linear Algebra, vol. II of Handbook for Automatic Computation (New York: Springer-Verlag)

"Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery,

Tests:
the correctness of the result is tested by checking it against known good values.

Definition at line 44 of file tqreigendecomposition.hpp.

Member Enumeration Documentation

◆ EigenVectorCalculation

Enumerator
WithEigenVector 
WithoutEigenVector 
OnlyFirstRowEigenVector 

Definition at line 46 of file tqreigendecomposition.hpp.

◆ ShiftStrategy

Enumerator
NoShift 
Overrelaxation 
CloseEigenValue 

Definition at line 50 of file tqreigendecomposition.hpp.

Constructor & Destructor Documentation

◆ TqrEigenDecomposition()

TqrEigenDecomposition ( const Array diag,
const Array sub,
EigenVectorCalculation  calc = WithEigenVector,
ShiftStrategy  strategy = CloseEigenValue 
)

Definition at line 29 of file tqreigendecomposition.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ eigenvalues()

const Array & eigenvalues ( ) const

Definition at line 59 of file tqreigendecomposition.hpp.

+ Here is the caller graph for this function:

◆ eigenvectors()

const Matrix & eigenvectors ( ) const

Definition at line 60 of file tqreigendecomposition.hpp.

+ Here is the caller graph for this function:

◆ iterations()

Size iterations ( ) const

Definition at line 62 of file tqreigendecomposition.hpp.

◆ offDiagIsZero()

bool offDiagIsZero ( Size  k,
Array e 
)
private

Definition at line 144 of file tqreigendecomposition.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ iter_

Size iter_ = 0
private

Definition at line 67 of file tqreigendecomposition.hpp.

◆ d_

Array d_
private

Definition at line 68 of file tqreigendecomposition.hpp.

◆ ev_

Matrix ev_
private

Definition at line 69 of file tqreigendecomposition.hpp.