GeoModel - GeoModelCore
Cos.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 //---------------------Cos--------------------------------------------------//
7 // //
8 // Class Cos //
9 // //
10 //--------------------------------------------------------------------------//
11 #ifndef Cos_h
12 #define Cos_h 1
13 
14 #include "GeoGenericFunctions/AbsFunction.h"
15 
16 namespace GeoGenfun {
17 
18  class Cos : public AbsFunction {
19 
20  FUNCTION_OBJECT_DEF(Cos)
21 
22  public:
23 
24  // Constructor
25  Cos();
26 
27  // Destructor
28  virtual ~Cos();
29 
30  // Copy constructor
31  Cos(const Cos &right);
32 
33  // Retreive function value
34  virtual double operator ()(double argument) const override;
35  virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
36 
37  // Derivative.
38  virtual Derivative partial (unsigned int) const override;
39 
40  // Does this function have an analytic derivative?
41  virtual bool hasAnalyticDerivative() const override {return true;}
42 
43  private:
44 
45  // It is illegal to assign a Cosine
46  const Cos & operator=(const Cos &right);
47 
48  };
49 } // namespace GeoGenfun
50 #endif
Definition: Abs.h:15