CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
GenericFunctions
CLHEP
GenericFunctions
CLHEP/GenericFunctions/Mod.hh
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
//----------------------Mod-----------------------------------------------//
4
// //
5
// Class Mod (Modulo) //
6
// Joe Boudreau, Petar Maksimovic, Nov. 2002 //
7
// //
8
// Mod(x) returns x%y //
9
//------------------------------------------------------------------------//
10
#ifndef Mod_h
11
#define Mod_h 1
12
#include "
CLHEP/GenericFunctions/AbsFunction.hh
"
13
namespace
Genfun
{
14
19
class
Mod
:
public
AbsFunction
{
20
21
FUNCTION_OBJECT_DEF
(
Mod
)
22
23
public
:
24
25
// Constructor
26
Mod
(
double
y);
27
28
// Copy constructor
29
Mod
(
const
Mod
&right);
30
31
// Destructor
32
virtual
~Mod
();
33
34
// Retrieve function value
35
36
virtual
double
operator ()
(
double
argument)
const
;
37
virtual
double
operator ()
(
const
Argument
&
a
)
const
{
return
operator()
(
a
[0]);}
38
39
private
:
40
41
// It is illegal to assign a fixed constant
42
const
Mod
& operator=(
const
Mod
&right);
43
44
double
_y;
// mod (as a double)
45
46
};
47
}
// namespace Genfun
48
#endif
AbsFunction.hh
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition
CLHEP/GenericFunctions/AbsFunction.hh:144
Genfun::AbsFunction
Definition
CLHEP/GenericFunctions/AbsFunction.hh:48
Genfun::Argument
Definition
CLHEP/GenericFunctions/Argument.hh:17
Genfun::Mod
Definition
CLHEP/GenericFunctions/Mod.hh:19
Genfun::Mod::~Mod
virtual ~Mod()
Definition
Mod.cc:17
Genfun::Mod::operator()
virtual double operator()(double argument) const
Definition
Mod.cc:26
Genfun
Definition
CLHEP/GenericFunctions/Abs.hh:14
a
@ a
Definition
testCategories.cc:125
Generated by
1.9.8