|
template<typename T > |
size_t | num_of_eigs_smaller_than (T c, const std::vector< T > &alpha, const std::vector< T > &beta) |
| Finds the number of eigenvalues of given tridiagonal matrix smaller than c . More...
|
|
template<typename T > |
T | tridiagonal_eigen_limit (const std::vector< T > &alpha, const std::vector< T > &beta) |
| Computes the upper bound of the absolute value of eigenvalues by Gerschgorin theorem. More...
|
|
template<typename T > |
T | find_mth_eigenvalue (const std::vector< T > &alpha, const std::vector< T > &beta, const size_t m) |
| Finds the m th smaller eigenvalue of given tridiagonal matrix. More...
|
|
template<typename T > |
std::vector< T > | compute_tridiagonal_eigenvector_from_eigenvalue (const std::vector< T > &alpha, const std::vector< T > &beta, const size_t index, const T ev) |
| Computes an eigenvector corresponding to given eigenvalue for given tri-diagonal matrix. More...
|
|
template<typename T > |
void | tridiagonal_eigenpairs_bisection (const std::vector< T > &alpha, const std::vector< T > &beta, std::vector< T > &eigenvalues, std::vector< std::vector< T > > &eigenvectors) |
| Computes all eigenpairs (eigenvalues and eigenvectors) for given tri-diagonal matrix. More...
|
|
template<typename T > |
std::pair< T, T > | calc_givens_cs (T a, T b) |
| Calculates the cosine and sine of Givens rotation that eliminates a specific element (see detail). More...
|
|
template<typename T > |
void | isqr_step (std::vector< T > &alpha, std::vector< T > &beta, std::vector< std::vector< T > > &q, size_t offset, size_t nsub, bool rotate_matrix) |
| Performs an implicit shift QR step A = Z^T A Z on given sub tridiagonal matrix A. More...
|
|
template<typename T > |
void | find_subspace (const std::vector< T > &alpha, std::vector< T > &beta, size_t &submatrix_first, size_t &submatrix_last) |
| Find sub-tridiagonal matrix that remains non-diagonal. More...
|
|
template<typename T > |
size_t | tridiagonal_eigenpairs (const std::vector< T > &alpha, const std::vector< T > &beta, std::vector< T > &eigenvalues, std::vector< std::vector< T > > &eigenvectors, bool compute_eigenvector=true) |
| Computes all eigenpairs (eigenvalues and eigenvectors) for given tri-diagonal matrix using the Implicitly Shifted QR algorithm. More...
|
|
template<typename T > |
size_t | tridiagonal_eigenvalues (const std::vector< T > &alpha, const std::vector< T > &beta, std::vector< T > &eigenvalues) |
| Computes all eigenvalues for given tri-diagonal matrix using the Implicitly Shifted QR algorithm. More...
|
|
template<typename T >
std::pair< T, T > lambda_lanczos::tridiagonal_impl::calc_givens_cs |
( |
T |
a, |
|
|
T |
b |
|
) |
| |
|
inline |
Calculates the cosine and sine of Givens rotation that eliminates a specific element (see detail).
This function calculates the cosine and sine that eliminate the element b, i.e. that satisfy
( c s)(a) = (x)
(-s c)(b) = (0),
*
where x >= 0.
- Parameters
-
[in] | a | Input element to remain non-zero. |
[in] | b | Input element to be eliminated. |
- Returns
- Pair (c, s).