CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
5namespace Genfun {
6FUNCTION_OBJECT_IMP(FunctionNegation)
7
9 _arg1(arg1->clone())
10{
11}
12
14 AbsFunction(right),
15 _arg1(right._arg1->clone())
16{
17}
18
19
21{
22 delete _arg1;
23}
24
26 return _arg1->dimensionality();
27}
28
29
30double FunctionNegation::operator ()(double x) const
31{
32 return -((*_arg1)(x));
33}
34
36{
37 return -((*_arg1)(x));
38}
39
40
41Derivative FunctionNegation::partial(unsigned int index) const {
42 const AbsFunction & fPrime = -(_arg1->partial(index));
43 return Derivative(&fPrime);
44}
45
46
47} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79
virtual double operator()(double argument) const override
virtual unsigned int dimensionality() const override
FunctionNegation(const AbsFunction *arg1)
Derivative partial(unsigned int) const override
Definition: Abs.hh:14
FunctionNoop Derivative
Definition: AbsFunction.hh:42