File: arrgcomp.h

package info (click to toggle)
arpack%2B%2B 2.1-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,216 kB
  • ctags: 2,349
  • sloc: cpp: 19,093; ansic: 2,201; makefile: 508
file content (109 lines) | stat: -rw-r--r-- 2,707 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
   ARPACK++ v1.0 8/1/1997
   c++ interface to ARPACK code.

   MODULE ARRGComp.h.
   Arpack++ class ARrcCompGenEig definition.

   ARPACK Authors
      Richard Lehoucq
      Danny Sorensen
      Chao Yang
      Dept. of Computational & Applied Mathematics
      Rice University
      Houston, Texas
*/

#ifndef ARRGCOMP_H
#define ARRGCOMP_H

#include <stddef.h>
#include "arch.h"
#include "arrscomp.h"
#include "arrgeig.h"

template<class FLOAT>
class ARrcCompGenEig:
  virtual public ARrcGenEig<FLOAT, arcomplex<FLOAT> >,
  virtual public ARrcCompStdEig<FLOAT>  {

 public:

  // a) Constructors and destructor.

  ARrcCompGenEig() { }
  // Short constructor (Does nothing but calling base classes constructors).

  ARrcCompGenEig(int np, int nevp, char* whichp = "LM",
                 int ncvp = 0, FLOAT tolp = 0.0, int maxitp = 0,
                 arcomplex<FLOAT>* residp = NULL, bool ishiftp = true);
  // Long constructor (regular mode).

  ARrcCompGenEig(int np, int nevp, arcomplex<FLOAT> sigmap,
                 char* whichp = "LM", int ncvp = 0, FLOAT tolp = 0.0,
                 int maxitp = 0, arcomplex<FLOAT>* residp = NULL,
                 bool ishiftp = true);
  // Long constructor (shift and invert mode).

  ARrcCompGenEig(const ARrcCompGenEig& other) { Copy(other); }
  // Copy constructor.

  virtual ~ARrcCompGenEig() { }
  // Destructor.

 // b) Operators.

  ARrcCompGenEig& operator=(const ARrcCompGenEig& other);
  // Assignment operator.

}; // class ARrcCompGenEig.


// ------------------------------------------------------------------------ //
// ARrcCompGenEig member functions definition.                              //
// ------------------------------------------------------------------------ //


template<class FLOAT>
inline ARrcCompGenEig<FLOAT>::
ARrcCompGenEig(int np, int nevp, char* whichp, int ncvp, FLOAT tolp,
               int maxitp, arcomplex<FLOAT>* residp, bool ishiftp)

{

  NoShift();
  DefineParameters(np, nevp, whichp, ncvp, tolp, maxitp, residp, ishiftp);

} // Long constructor (regular mode).


template<class FLOAT>
inline ARrcCompGenEig<FLOAT>::
ARrcCompGenEig(int np, int nevp, arcomplex<FLOAT> sigmap, char* whichp,
               int ncvp, FLOAT tolp, int maxitp, arcomplex<FLOAT>* residp,
               bool ishiftp)

{

  ChangeShift(sigmap);
  DefineParameters(np, nevp, whichp, ncvp, tolp, maxitp, residp, ishiftp);

} // Long constructor (shif and invert mode).


template<class FLOAT>
ARrcCompGenEig<FLOAT>& ARrcCompGenEig<FLOAT>::
operator=(const ARrcCompGenEig<FLOAT>& other)
{

  if (this != &other) { // Stroustrup suggestion.
    ClearMem();
    Copy(other);
  }
  return *this;

} // operator=.


#endif // ARRGCOMP_H