OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
AbstractFun.h
Go to the documentation of this file.
1 #ifndef OPAL_AbstractFun_HH
2 #define OPAL_AbstractFun_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: AbstractFun.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: AbstractFun
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:43 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Algebra/Vector.h"
22 #include <iosfwd>
23 #include <string>
24 
25 
26 // Class AbstractFun
27 // ------------------------------------------------------------------------
29 // The interface allows a constraint to return several constrained
30 // functions.
31 
32 class AbstractFun {
33 
34 public:
35 
36  AbstractFun();
37  virtual ~AbstractFun();
38 
40  virtual int countConstraints() const = 0;
41 
43  // Increment [b]n[/b] for each constrained value and store the value
44  // in vector [b]f[/b].
45  virtual void evaluate(Vector<double> &f, int &n) const = 0;
46 
48  virtual void print(std::ostream &) const = 0;
49 
50 private:
51 
52  // Not implemented.
53  AbstractFun(const AbstractFun &);
54  void operator=(const AbstractFun &);
55 };
56 
57 #endif // OPAL_AbstractFun_HH
void operator=(const AbstractFun &)
Abstract base for matching constraints.
Definition: AbstractFun.h:32
virtual int countConstraints() const =0
Get number of constrained values.
virtual void print(std::ostream &) const =0
Print the function name and value(s).
virtual void evaluate(Vector< double > &f, int &n) const =0
Evaluate the matching function(s).
virtual ~AbstractFun()
Definition: AbstractFun.cpp:30