GeoModel - GeoModelCore
Mod.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 #ifndef Mod_h
7 #define Mod_h 1
8 #include "GeoGenericFunctions/AbsFunction.h"
9 namespace GeoGenfun {
10  class Mod : public AbsFunction {
11 
12  FUNCTION_OBJECT_DEF(Mod)
13 
14  public:
15 
16  // Constructor
17  Mod(double y);
18 
19  // Copy constructor
20  Mod(const Mod &right);
21 
22  // Destructor
23  virtual ~Mod();
24 
25  // Retrieve function value
26 
27  virtual double operator ()(double argument) const override;
28  virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
29 
30  // Retrieve the modulus:
31  double modulus() const {return _y;}
32 
33  private:
34 
35  // It is illegal to assign a fixed constant
36  const Mod & operator=(const Mod &right);
37 
38  double _y; // mod (as a double)
39 
40  };
41 } // namespace GeoGenfun
42 #endif
Definition: Abs.h:15