|
ergo
|
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 ) |
Get Rayleigh quotient: A = (y'Ay)/(y'y), y = eigVecPtr.
References A, and mat::VectorGeneral< Treal, Tvector >::eucl().
Referenced by PurificationGeneral< MatrixType >::check_homo_lumo_eigenvalues(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PurificationGeneral< MatrixType >::get_eigenvalue_of_F_from_eigv_of_Xi(), and main().
| 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 ) |
Function for choosing method for computing eigenvectors.
| [in] | A | Matrix for which to compute eigenvectors. |
| [in] | tol | Eigensolver tolerance. |
| [out] | eigVal | Eigenvalue(s). |
| eigVec | [in/out] 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 A, 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 ) |
Use Lanzcos method for computing eigenvectors.
See function computeEigenvectors for the meaning of parameters.
References A, 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 ) |
Use power method for computing eigenvectors.
See function computeEigenvectors for the meaning of parameters.
References A, mat::VectorGeneral< Treal, Tvector >::eucl(), and template_blas_fabs().
Referenced by computeEigenvectors().