CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Abs.hh
Go to the documentation of this file.
1// $Id:
2// -*- C++ -*-
3//
4//----------------------Abs---------- --------------------------------------//
5// //
6// Class Abs //
7// Joe Boudreau, Petar Maksimovic, Nov. 1999 //
8// //
9// Abs is a function that returns the absolute value of its argument //
10//--------------------------------------------------------------------------//
11#ifndef Abs_h
12#define Abs_h 1
13#include "CLHEP/GenericFunctions/AbsFunction.hh"
14namespace Genfun {
15 class Abs : public AbsFunction {
16
18
19 public:
20
21 // Constructor
22 Abs();
23
24 // Copy constructor
25 Abs(const Abs &right);
26
27 // Destructor
28 virtual ~Abs();
29
30 // Retrieve function value
31 virtual double operator ()(double argument) const override;
32 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
33
34 private:
35
36 // It is illegal to assign a fixed constant
37 const Abs & operator=(const Abs &right);
38
39 };
40}
41
42#endif
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
Abs()
Definition: Abs.cc:11
virtual ~Abs()
Definition: Abs.cc:18
virtual double operator()(double argument) const override
Definition: Abs.cc:21
Definition: Abs.hh:14