ConicBundle
lanczos.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CH_MATRIX_CLASSES__LANCZOS_HXX
4 #define CH_MATRIX_CLASSES__LANCZOS_HXX
5 
14 #ifndef CH_MATRIX_CLASSES__MATRIX_HXX
15 #include "matrix.hxx"
16 #endif
17 
18 namespace CH_Matrix_Classes {
19 
24 
34  {
35  public:
36  virtual ~Lanczosmatrix(){}
37 
39  virtual Integer lanczosdim() const=0;
40 
42  virtual Integer lanczosflops() const=0;
43 
45  virtual int lanczosmult(const Matrix& A,Matrix& B) const=0;
46  };
47 
48 
53  class Lanczos
54  {
55  public:
57  virtual ~Lanczos(){}
58 
65 
67  virtual void set_mineig(Real ie)=0;
69  virtual void set_maxmult(Integer mop)=0;
71  virtual void set_maxiter(Integer mi)=0;
73  virtual void set_relprec(Real relprec)=0;
75  virtual void set_nblockmult(Integer nb)=0;
77  virtual void set_nchebit(Integer nc)=0;
79  virtual void enable_stop_above(Real ub)=0;
81  virtual void disable_stop_above()=0;
82 
84  virtual void set_retlanvecs(Integer nl)=0;
85 
87  virtual int get_lanczosvecs(Matrix& val,Matrix& vecs) const=0;
88 
90  virtual Real get_relprec(void)=0;
91 
93  virtual int get_err() const=0;
94 
96  virtual Integer get_iter() const=0;
97 
99  virtual Integer get_nmult() const=0;
100 
102 
104  virtual int compute(const Lanczosmatrix* bigmat,
105  Matrix& eigval,
106  Matrix& eigvec,
107  Integer nreig,
108  Integer in_blocksz=0,
109  Integer maxcol=0
110  )=0;
111 
116 
118  virtual void set_out(std::ostream* out=0,int print_level=1)=0;
119 
121  virtual std::ostream& save(std::ostream& out) const =0;
122 
124  virtual std::istream& restore(std::istream& in) =0;
125 
127  };
128 
130 
131 }
132 
133 #endif
134 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
Header declaring the classes CH_Matrix_Classes::Realrange and CH_Matrix_Classes::Matrix having Real e...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
Abstract base class for supplying the input matrix for Lanzcosmethods.
Definition: lanczos.hxx:33
Abstract interface to Lanzcos methods for computing a few extremal eigenvalues given via a Lanczosmat...
Definition: lanczos.hxx:53
virtual int lanczosmult(const Matrix &A, Matrix &B) const =0
computes B = (*this) * A; A and B must not be the same object!
Matrix Classes and Linear Algebra. See Matrix Classes (namespace CH_Matrix_Classes) for a quick intro...
Definition: PSCOracle.hxx:20
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual Integer lanczosdim() const =0
returns the order of the (virtual) symmetric matrix
virtual Integer lanczosflops() const =0
returns a rough estimate on the number of flops needed by lanczosmult() for a vector ...