GeoModel - GeoModelCore
Pi.h
1 //==========================================================================//
2 // Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3 // Joe Boudreau. Software licensed under the terms and conditions of the //
4 // GNU Lesser Public License v3. //
5 //==========================================================================//
6 //--------------------------Pi----------------------------------------------//
7 // //
8 // Pi, result of multiplication of N functions //
9 // //
10 //--------------------------------------------------------------------------//
11 
12 #ifndef Pi_h
13 #define Pi_h 1
14 #include "GeoGenericFunctions/AbsFunction.h"
15 
16 namespace GeoGenfun {
17 
18  class Pi : public AbsFunction {
19 
20  FUNCTION_OBJECT_DEF(Pi)
21 
22  public:
23 
24  // Constructor
25  Pi();
26 
27  // Copy constructor
28  Pi(const Pi &right);
29 
30  // Destructor
31  virtual ~Pi();
32 
33  // Retreive function value
34  virtual double operator ()(double argument) const override;
35  virtual double operator ()(const Argument & a) const override;
36 
37  // Dimensionality
38  virtual unsigned int dimensionality() const override;
39 
40  // Derivative.
41  virtual Derivative partial (unsigned int) const override;
42 
43  // Does this function have an analytic derivative?
44  virtual bool hasAnalyticDerivative() const override {return true;}
45 
46  // Add a function to the sum:
47  void accumulate (const AbsFunction & fcn);
48 
49  private:
50 
51  // It is illegal to assign a Pi
52  const Pi & operator=(const Pi &right);
53 
54  std::vector<const AbsFunction *> _fcn;
55 
56  };
57 } // namespace GeoGenfun
58 #endif
Definition: Abs.h:15