OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::RealSymmetricTridiagonal< Real > Class Template Reference

#include <RealSymmetricTridiagonal.hpp>

Public Member Functions

 RealSymmetricTridiagonal (const DynamicVector< Real > &diagonals, const DynamicVector< Real > &subdiagonals)
 
void getEigenvectors (DynamicRectMatrix< Real > &V_)
 
void getEigenvalues (DynamicVector< Real > &d_)
 

Private Member Functions

void tql2 ()
 

Private Attributes

int n
 
DynamicVector< Real > d
 
DynamicVector< Real > e
 
DynamicRectMatrix< Real > V
 

Detailed Description

template<typename Real>
class OpenMD::RealSymmetricTridiagonal< Real >

Computes eigenvalues and eigenvectors of a real (non-complex) symmetric tridiagonal matrix by the QL method.

Definition at line 63 of file RealSymmetricTridiagonal.hpp.

Constructor & Destructor Documentation

◆ RealSymmetricTridiagonal()

template<typename Real >
OpenMD::RealSymmetricTridiagonal< Real >::RealSymmetricTridiagonal ( const DynamicVector< Real > &  diagonals,
const DynamicVector< Real > &  subdiagonals 
)
inline

Construct the eigenvalue decomposition

Parameters
diagonalsthe diagonal elements of the input matrix.
subdiagonalsthe subdiagonal elements of the input matrix in its last n-1 positions. subdiagonals[0] is arbitrary.

Definition at line 204 of file RealSymmetricTridiagonal.hpp.

References OpenMD::RealSymmetricTridiagonal< Real >::n, OpenMD::RealSymmetricTridiagonal< Real >::tql2(), and OpenMD::RealSymmetricTridiagonal< Real >::V.

Member Function Documentation

◆ getEigenvalues()

template<typename Real >
void OpenMD::RealSymmetricTridiagonal< Real >::getEigenvalues ( DynamicVector< Real > &  d_)
inline

Return the real parts of the eigenvalues

Returns
real(diag(D))

Definition at line 229 of file RealSymmetricTridiagonal.hpp.

References OpenMD::RealSymmetricTridiagonal< Real >::d.

◆ getEigenvectors()

template<typename Real >
void OpenMD::RealSymmetricTridiagonal< Real >::getEigenvectors ( DynamicRectMatrix< Real > &  V_)
inline

Return the eigenvector matrix

Returns
V

Definition at line 221 of file RealSymmetricTridiagonal.hpp.

References OpenMD::RealSymmetricTridiagonal< Real >::V.

◆ tql2()

Member Data Documentation

◆ d

◆ e

template<typename Real >
DynamicVector<Real> OpenMD::RealSymmetricTridiagonal< Real >::e
private

◆ n

template<typename Real >
int OpenMD::RealSymmetricTridiagonal< Real >::n
private

◆ V


The documentation for this class was generated from the following file: