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