GeoModel - GeoModelCore
FunctionPlusParameter.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 
7 //--------------------------FunctionPlusParameter---------------------------//
8 // //
9 // ConstOverFunction, result of adding a function and a parameter //
10 // //
11 //--------------------------------------------------------------------------//
12 
13 #ifndef FunctionPlusParameter_h
14 #define FunctionPlusParameter_h 1
15 #include "GeoGenericFunctions/AbsFunction.h"
16 
17 namespace GeoGenfun {
18 
20 
21  FUNCTION_OBJECT_DEF(FunctionPlusParameter)
22 
23  public:
24 
25  // Constructor
26  FunctionPlusParameter(const AbsParameter *parameter, const AbsFunction *function);
27 
28  // Copy constructor
30 
31  // Destructor
32  virtual ~FunctionPlusParameter();
33 
34  // Retreive function value
35  virtual double operator ()(double argument) const override;
36  virtual double operator ()(const Argument & a) const override;
37 
38  // Dimensionality
39  virtual unsigned int dimensionality() const override;
40 
41  // Derivative.
42  virtual Derivative partial (unsigned int) const override;
43 
44  // Does this function have an analytic derivative?
45  virtual bool hasAnalyticDerivative() const override {return true;}
46 
47  private:
48 
49  // It is illegal to assign a FunctionPlusParameter
50  const FunctionPlusParameter & operator=(const FunctionPlusParameter &right);
51 
52  const AbsFunction *_function;
53  AbsParameter *_parameter;
54 
55  };
56 } // namespace GeoGenfun
57 #endif
Definition: Abs.h:15