#include "small_matrix.hpp"
Include dependency graph for small_matrix.cc:

This graph shows which files directly or indirectly include this file:

Defines | |
| #define | SHT_GAMMA(i) (B ((i)-1, (i))) |
| #define | SHT_DELTA(i) (B ((i), (i))) |
Functions | |
| template<class T> | |
| void | sym_Householder_tridiag (small_matrix< T > &A, small_matrix< T > &B) |
| Householder tridiagonalization method for symmetric matrices. | |
| template<class T> | |
| bool | sym_eig_QR (small_matrix< T > &A, small_matrix< T > &S, int eig_QR_moi, double eig_QR_prec) |
| Computes eigenvalues and the corresponding eigenvectors of the matrix A by the QR-method. | |
This file contains implementations of non-inline functions. If you produce at the compilation more than one object file, you may need to instanciate the classes small_matrix<T>, small_vector<T> and SmallMatrix<T> in one of you module: for ex. for T = double write
#include "small_matrix.cc" template class small_matrix<double>; template class small_vector<double>; template class SmallMatrix<double>;
template void sym_Householder_tridiag<double> ( small_matrix<double> & A, small_matrix<double> & B ); template bool sym_eig_QR<double> ( small_matrix<double> & A, small_matrix<double> & S, int eig_QR_moi, double eig_QR_prec );
History: Sep. 16, 2004 - extracted from small_matrix.hpp
| #define SHT_DELTA | ( | i | ) | (B ((i), (i))) |
| #define SHT_GAMMA | ( | i | ) | (B ((i)-1, (i))) |
| bool sym_eig_QR | ( | small_matrix< T > & | A, | |
| small_matrix< T > & | S, | |||
| int | eig_QR_moi = 128, |
|||
| double | eig_QR_prec = 5e-14 | |||
| ) | [inline] |
Computes eigenvalues and the corresponding eigenvectors of the matrix A by the QR-method.
The Wilkinson shift strategy is used. Only symmetric matrices are allowed as Wilkinson strategy is implemented only for this case. The matrix 'A' is destroyed, and after the computation it contains an almost diagonal matrix, whose diagonal entries are approximations of the eigenvalues. These entries are ordered in the ascending order. The second argument S contains in its columns the corresponding eigenvectors. The method is iterative and there are two stopping criteria:
For the numerical stability reasons, we advise to use only 'double'.
| [in,out] | A | The Matrix to solve the eigenproblem for. |
| [in,out] | S | Contains the eigenvectors after the call. |
| [in] | eig_QR_moi | Maximum number of the iterations to do. |
| [in] | eig_QR_prec | The precision to achieve. |
| void sym_Householder_tridiag | ( | small_matrix< T > & | A, | |
| small_matrix< T > & | B | |||
| ) | [inline] |
Householder tridiagonalization method for symmetric matrices.
Transforms a given matrix A to the tridiagonal form and saves it in B. After the computation A keeps the back transformation.
| [in,out] | A | Initially the matrix to tridiagonalize, contains the transformation after the call. |
| [in] | B | For the tridiagonal matrix |
1.5.2