CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
GenericFunctions
src
FunctionNegation.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: FunctionNegation.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3
#include "
CLHEP/GenericFunctions/FunctionNegation.hh
"
4
5
namespace
Genfun
{
6
FUNCTION_OBJECT_IMP
(FunctionNegation)
7
8
FunctionNegation
::
FunctionNegation
(const
AbsFunction
*arg1):
9
_arg1(arg1->clone())
10
{
11
}
12
13
FunctionNegation::FunctionNegation
(
const
FunctionNegation
& right):
14
AbsFunction
(right),
15
_arg1(right._arg1->clone())
16
{
17
}
18
19
20
FunctionNegation::~FunctionNegation
()
21
{
22
delete
_arg1;
23
}
24
25
unsigned
int
FunctionNegation::dimensionality
()
const
{
26
return
_arg1->
dimensionality
();
27
}
28
29
30
double
FunctionNegation::operator ()
(
double
x)
const
31
{
32
return
-((*_arg1)(x));
33
}
34
35
double
FunctionNegation::operator ()
(
const
Argument
& x)
const
36
{
37
return
-((*_arg1)(x));
38
}
39
40
41
Derivative
FunctionNegation::partial
(
unsigned
int
index)
const
{
42
const
AbsFunction
& fPrime = -(_arg1->
partial
(index));
43
return
Derivative
(&fPrime);
44
}
45
46
47
}
// namespace Genfun
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition:
CLHEP/GenericFunctions/AbsFunction.hh:156
FunctionNegation.hh
Genfun::AbsFunction
Definition:
CLHEP/GenericFunctions/AbsFunction.hh:48
Genfun::AbsFunction::partial
virtual Derivative partial(unsigned int) const
Definition:
AbsFunction.cc:40
Genfun::AbsFunction::dimensionality
virtual unsigned int dimensionality() const
Definition:
AbsFunction.cc:79
Genfun::Argument
Definition:
CLHEP/GenericFunctions/Argument.hh:17
Genfun::FunctionNegation
Definition:
CLHEP/GenericFunctions/FunctionNegation.hh:19
Genfun::FunctionNegation::~FunctionNegation
virtual ~FunctionNegation()
Definition:
FunctionNegation.cc:20
Genfun::FunctionNegation::FunctionNegation
FunctionNegation(const AbsFunction *arg1)
Definition:
FunctionNegation.cc:8
Genfun::FunctionNegation::dimensionality
virtual unsigned int dimensionality() const
Definition:
FunctionNegation.cc:25
Genfun::FunctionNegation::partial
Derivative partial(unsigned int) const
Definition:
FunctionNegation.cc:41
Genfun::FunctionNegation::operator()
virtual double operator()(double argument) const
Definition:
FunctionNegation.cc:30
Genfun::FunctionNoop
Definition:
CLHEP/GenericFunctions/FunctionNoop.hh:19
Genfun
Definition:
CLHEP/GenericFunctions/Abs.hh:14
Genfun::Derivative
FunctionNoop Derivative
Definition:
CLHEP/GenericFunctions/AbsFunction.hh:42
Generated by
1.9.4