Functions | |
| template<typename Treal , typename MatrixType , typename VectorType > | |
| Treal | compute_rayleigh_quotient (const MatrixType &A, const VectorType &eigVec) |
| Get Rayleigh quotient: A = (y'Ay)/(y'y), y = eigVecPtr. | |
| template<typename Treal , typename MatrixType , typename VectorType > | |
| void | lanczos_method (const MatrixType &A, std::vector< Treal > &eigVal, std::vector< VectorType > &eigVec, int number_of_eigenvalues, const Treal TOL, std::vector< int > &num_iter, int maxit=200, bool do_deflation=false) |
| Use Lanzcos method for computing eigenvectors. | |
| template<typename Treal , typename MatrixType , typename VectorType > | |
| void | power_method (const MatrixType &A, Treal &eigVal, VectorType &eigVec, const Treal TOL, int &num_iter, int maxit=200) |
| Use power method for computing eigenvectors. | |
| template<typename Treal , typename MatrixType , typename VectorType > | |
| int | computeEigenvectors (const MatrixType &A, Treal tol, std::vector< Treal > &eigVal, std::vector< VectorType > &eigVec, int number_of_eigenvalues_to_compute, std::string method, std::vector< int > &num_iter, int maxit=200, bool do_deflation=false) |
| Function for choosing method for computing eigenvectors. | |
| Treal eigvec::compute_rayleigh_quotient | ( | const MatrixType & | A, | |
| const VectorType & | eigVec | |||
| ) | [inline] |
Get Rayleigh quotient: A = (y'Ay)/(y'y), y = eigVecPtr.
References mat::VectorGeneral< Treal, Tvector >::eucl(), and mat::transpose().
| int eigvec::computeEigenvectors | ( | const MatrixType & | A, | |
| Treal | tol, | |||
| std::vector< Treal > & | eigVal, | |||
| std::vector< VectorType > & | eigVec, | |||
| int | number_of_eigenvalues_to_compute, | |||
| std::string | method, | |||
| std::vector< int > & | num_iter, | |||
| int | maxit = 200, |
|||
| bool | do_deflation = false | |||
| ) | [inline] |
Function for choosing method for computing eigenvectors.
| [in] | A | Matrix for which to compute eigenvectors. |
| [in] | tol | Eigensolver tolerance. |
| [out] | eigVal | Eigenvalue(s). |
| [in,out] | eigVec | Eigenvector(s). |
| [in] | number_of_eigenvalues_to_compute | Number of eigenvalues which Lanczos should compute. |
| [in] | method | Chosen eigensolver (power or Lanczos). |
| [out] | num_iter | Actual number of iterations (now just num_iter[0] is used). |
| [in] | maxit | Maximum number of iterations. |
| [in] | do_deflation | Use deflation with eigVec[0]. |
References lanczos_method(), and power_method().
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), and main().
| void eigvec::lanczos_method | ( | const MatrixType & | A, | |
| std::vector< Treal > & | eigVal, | |||
| std::vector< VectorType > & | eigVec, | |||
| int | number_of_eigenvalues, | |||
| const Treal | TOL, | |||
| std::vector< int > & | num_iter, | |||
| int | maxit = 200, |
|||
| bool | do_deflation = false | |||
| ) | [inline] |
Use Lanzcos method for computing eigenvectors.
See function computeEigenvectors for the meaning of parameters.
References mat::VectorGeneral< Treal, Tvector >::eucl(), mat::arn::LanczosSeveralLargestEig< Treal, Tmatrix, Tvector >::get_ith_eigenpair(), mat::arn::LanczosSeveralLargestEig< Treal, Tmatrix, Tvector >::get_num_iter(), mat::arn::LanczosSeveralLargestEig< Treal, Tmatrix, Tvector >::run(), mat::arn::LanczosSeveralLargestEig< Treal, Tmatrix, Tvector >::setAbsTol(), and mat::arn::LanczosSeveralLargestEig< Treal, Tmatrix, Tvector >::setRelTol().
Referenced by computeEigenvectors().
| void eigvec::power_method | ( | const MatrixType & | A, | |
| Treal & | eigVal, | |||
| VectorType & | eigVec, | |||
| const Treal | TOL, | |||
| int & | num_iter, | |||
| int | maxit = 200 | |||
| ) | [inline] |
Use power method for computing eigenvectors.
See function computeEigenvectors for the meaning of parameters.
References mat::VectorGeneral< Treal, Tvector >::eucl(), template_blas_fabs(), and mat::transpose().
Referenced by computeEigenvectors().
1.6.1