namespace ewalena  0.2.15
ewalena is not an acronym
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
ewalena::SolverJacobi< ValueType > Class Template Reference

#include <include/ewalena/lac/solver_jacobi.h>

Inheritance diagram for ewalena::SolverJacobi< ValueType >:
Inheritance graph
[legend]
Collaboration diagram for ewalena::SolverJacobi< ValueType >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void solve (const Matrix< ValueType > &A, Vector< ValueType > &lambda, VectorBasis< ValueType > &X)
 SolverJacobi (SolverControl< ValueType > &solver_control)

Protected Member Functions

void do_jacobi_rotation (ValueType *index_i, ValueType *index_j, const ValueType &root)
void sort (Vector< ValueType > &lambda)
void sort (Vector< ValueType > &lambda, VectorBasis< ValueType > &X)

Detailed Description

template<typename ValueType = double>
class ewalena::SolverJacobi< ValueType >

The SolverJacobi class is a standard eigenspectrum solver that uses cyclic Jacobi transformations to annihilate the upper triangle of the matrix $A$.

Let $t=s/c$ the definition of the rotation angle $\theta$ can be written as

\[t^2+2t\theta-1=0\quad,\]

where the smaller root $t$ corresponds to an angle $\theta<\pi/4$

Note:
The number of iterations returned by the solver control is equal to the number of Jacobi rotations performed by the solver.
Author:
Toby D. Young 2012.

Constructor & Destructor Documentation

template<typename ValueType = double>
ewalena::SolverJacobi< ValueType >::SolverJacobi ( SolverControl< ValueType > &  solver_control)

Constructor.


Member Function Documentation

template<typename ValueType >
void ewalena::SolverJacobi< ValueType >::do_jacobi_rotation ( ValueType *  index_i,
ValueType *  index_j,
const ValueType &  root 
) [inline, protected]

Do a jacobi rotation with two indices index_i and index_j. The variable root is the root of the quadratic: $t^2+2t\theta-1=0$, as defined in the class documentation.

template<typename ValueType = double>
virtual void ewalena::SolverJacobi< ValueType >::solve ( const Matrix< ValueType > &  A,
Vector< ValueType > &  lambda,
VectorBasis< ValueType > &  X 
) [virtual]

Actually solve the eigensystem $A\cdot x=\lambda x$.

Reimplemented from ewalena::SolverBase< ValueType >.

template<typename ValueType >
void ewalena::SolverJacobi< ValueType >::sort ( Vector< ValueType > &  lambda) [inline, protected]

Sort eigenvalues in ascending order.

Note:
This function will be moved elsewhere, and will then be depreciated.
template<typename ValueType >
void ewalena::SolverJacobi< ValueType >::sort ( Vector< ValueType > &  lambda,
VectorBasis< ValueType > &  X 
) [inline, protected]

Sort eigenpairs in ascending order.

Note:
This function will be moved elsewhere, and will then be depreciated.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines