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