|
FYS3150: Project 2
|
Function prototypes for the jacobi rotation algorithm. More...
#include <armadillo>Go to the source code of this file.
Functions | |
| void | jacobi_rotate (arma::mat &A, arma::mat &R, int k, int l) |
| Computes a single rotation. | |
| void | jacobi_eigensolver (const arma::mat &A, double eps, arma::vec &eigenvalues, arma::mat &eigenvectors, const int maxiter, int &iterations, bool &converged) |
Function prototypes for the jacobi rotation algorithm.
| void jacobi_eigensolver | ( | const arma::mat & | A, |
| double | eps, | ||
| arma::vec & | eigenvalues, | ||
| arma::mat & | eigenvectors, | ||
| const int | maxiter, | ||
| int & | iterations, | ||
| bool & | converged | ||
| ) |
@ brief Solves the eigenvalue problem using the jacobi rotation method.
Description
| A | The initial matrix to be solved |
| eps | Tolerance |
| eigenvalues | A vector that will contain the computed eigenvalues |
| eigenvectors | A Matrix that will contain the computed eigenvectors |
| maxiter | The max number of iterations allowed |
| iterations | To keep track of how many iterations the algorithm used |
| converged | Tells the user if the algorithm has converged |
| void jacobi_rotate | ( | arma::mat & | A, |
| arma::mat & | R, | ||
| int | k, | ||
| int | l | ||
| ) |
Computes a single rotation.
Description
| A | Matrix A (m) |
| R | The rotation matrix R (m) |
| k | Index of the row with the element of largest absolute value |
| l | Index of the column with the element of largest absolute value |