CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
CLHEP
GenericFunctions
CLHEP/GenericFunctions/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
"
14
namespace
Genfun {
15
class
Abs
:
public
AbsFunction
{
16
17
FUNCTION_OBJECT_DEF
(
Abs
)
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
;
32
virtual
double
operator ()
(
const
Argument
&
a
)
const
{
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
Generated on Sun Jun 17 2012 08:08:26 for CLHEP by
1.8.1.1