GeoModel - GeoModelCore
FunctionNoop.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 //--------------------------FunctionNoop------------------------------------//
8 // //
9 // Class FunctionNoop, output of the unary + operator: //
10 // //
11 //--------------------------------------------------------------------------//
12 #ifndef FunctionNoop_h
13 #define FunctionNoop_h 1
14 #include "GeoGenericFunctions/AbsFunction.h"
15 
16 // For persistification:
17 class FunctionNoopRecorder;
18 
19 
20 namespace GeoGenfun {
21 
22  class FunctionNoop : public AbsFunction {
23 
24  FUNCTION_OBJECT_DEF(FunctionNoop)
25 
26  public:
27 
28  // Constructor
29  FunctionNoop(const AbsFunction *arg1);
30 
31  // Copy constructor.
32  FunctionNoop(const FunctionNoop &right);
33 
34  // Destructor
35  virtual ~FunctionNoop();
36 
37  // Retreive function value
38  virtual double operator ()(double argument) const override;
39  virtual double operator ()(const Argument & a) const override;
40 
41  // Dimensionality
42  virtual unsigned int dimensionality() const override;
43 
44  // Derivative.
45  virtual Derivative partial (unsigned int) const override;
46 
47  // Does this function have an analytic derivative?
48  virtual bool hasAnalyticDerivative() const override {return true;}
49 
50  private:
51 
52  // It is illegal to assign a FunctionNoop
53  const FunctionNoop & operator=(const FunctionNoop &right);
54 
55  // The function we're negating.
56  const AbsFunction *_arg1;
57 
58  // For persistification:
59  friend class ::FunctionNoopRecorder;
60 
61 
62  };
63 } // namespace GeoGenfun
64 #endif
Definition: Abs.h:15