2005-02-01 00:08:03 +01:00
|
|
|
#include "vec.h"
|
|
|
|
#include "smat.h"
|
|
|
|
#include "mat.h"
|
|
|
|
#include "sparsemat.h"
|
|
|
|
#include "nonclass.h"
|
2005-01-31 14:43:38 +01:00
|
|
|
|
2005-02-04 10:58:36 +01:00
|
|
|
//Davidson diagonalization of real symmetric matrix (modified Lanczos)
|
2005-01-31 14:43:38 +01:00
|
|
|
|
2005-02-01 00:08:03 +01:00
|
|
|
//matrix can be any class which has nrows(), ncols(), diagonalof() and NRVec::gemv() available
|
2005-01-31 14:43:38 +01:00
|
|
|
//does not even have to be explicitly stored - direct CI
|
|
|
|
|
2005-02-01 00:08:03 +01:00
|
|
|
export template <typename T, typename Matrix>
|
2005-02-04 10:58:36 +01:00
|
|
|
extern void davidson(const Matrix &bigmat, NRVec<T> &eivals, void *eivecs,
|
|
|
|
int nroots=1, const bool verbose=0, const double eps=1e-6,
|
|
|
|
const bool incore=1, int maxit=100, const int maxkrylov = 500);
|