/** * @file EigValues.cpp * @brief EigValues Class * @author Michael Koch * @date 08/19/2008 */ #ifdef NOVISUAL #include #else #include #endif #include #include #include #include "EigValues.h" #include #define DEBUG_ARNOLDI using namespace std; // refactor-nice.pl: check this substitution // old: using namespace ice; using namespace NICE; void EVArnoldi::getEigenvalues(const GenericMatrix &data,Vector &eigenvalues,Matrix &eigenvectors,uint k) { if(data.rows()!=data.cols()) { throw("EVArnoldi: matrix has to be quadratic"); } if(k<=0) { throw("EVArnoldi: please use k>0."); } uint n=data.cols(); ice::Matrix rmatrix (k,n,0); ice::Matrix qmatrix (k,n,0);//saves data =eigenvectors ice::Vector q (n); ice::Vector r (n); eigenvalues.resize(n); srand48(time(NULL)); //random initialisation for(uint i=0;imindelta &&iterationmindelta && iteration1) { t(i-1, i-2)=beta[i-1]; t(i-2, i-1)=beta[i-1]; } } // refactor-nice.pl: check this substitution // old: Vector diff=check-vmatrix[kint]; NICE::Vector diff=check-vmatrix[kint]; delta=diff.Length(); iteration++; } cout<<"Lanczos-Iterations:"<