Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
eigpair.h
1 // Interface to BLZPACK routine blzdrd:
2 // eigenvalue and eigenvector calculation
3 // using Block Lanczos method
4 // Requires A symmetric
5 
6 #ifndef __EIGPAIR_H
7 #define __EIGPAIR_H
8 
9 #include "mathlib.h"
10 
11 int Eigenpair (TMatrix<double> *A, int neig,
12  TVector<double> *eigval,
13  TDenseMatrix<double> *eigvec,
14  TVector<double> *residual = 0);
15 
16 // A: symmetric matrix whose eigenpairs are to be determined
17 // neig: number of required eigenpairs
18 // eigval: vector of eigenvalues (dim = neig on exit)
19 // eigvec: matrix of eigenvectors (dim = neig x n on exit)
20 // residual: vector of residuals (dim = neig on exit, if defined)
21 // return value: error flag (0=ok)
22 
23 int Eigenpair_low (TCompRowMatrix<double> *L,
24  TVector<double> *d,
25  int neig,
26  int &nconv,
27  TVector<double> *eigval,
28  TDenseMatrix<double> *eigvec,
29  TVector<double> *residual = 0);
30 
31 // L,d: Cholesky decomposition of symmetric matrix
32 // neig: number of required eigenpairs
33 // nconv: number of converged eigenpairs on exit
34 // eigval: vector of eigenvalues (dim = nconv on exit)
35 // eigvec: matrix of eigenvectors (dim = nconv x n on exit)
36 // residual: vector of residuals (dim = nconv on exit, if defined)
37 // return value: error flag (0=ok)
38 
39 #endif // !__EIGPAIR_H