CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::FunctionNegation Class Reference

#include <FunctionNegation.hh>

+ Inheritance diagram for Genfun::FunctionNegation:

Public Member Functions

 FunctionNegation (const AbsFunction *arg1)
 
 FunctionNegation (const FunctionNegation &right)
 
virtual ~FunctionNegation ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &argument) const override
 
virtual unsigned int dimensionality () const override
 
Derivative partial (unsigned int) const override
 
virtual bool hasAnalyticDerivative () const override
 
- Public Member Functions inherited from Genfun::AbsFunction
 AbsFunction ()
 
 AbsFunction (const AbsFunction &right)
 
virtual ~AbsFunction ()
 
virtual unsigned int dimensionality () const
 
virtual double operator() (double argument) const =0
 
virtual double operator() (const Argument &argument) const =0
 
virtual AbsFunctionclone () const =0
 
virtual FunctionComposition operator() (const AbsFunction &f) const
 
virtual ParameterComposition operator() (const AbsParameter &p) const
 
Derivative derivative (const Variable &v) const
 
Derivative prime () const
 
virtual bool hasAnalyticDerivative () const
 
virtual Derivative partial (unsigned int) const
 

Detailed Description

Author

Definition at line 19 of file FunctionNegation.hh.

Constructor & Destructor Documentation

◆ FunctionNegation() [1/2]

Genfun::FunctionNegation::FunctionNegation ( const AbsFunction arg1)

Definition at line 8 of file FunctionNegation.cc.

8 :
9 _arg1(arg1->clone())
10{
11}

◆ FunctionNegation() [2/2]

Genfun::FunctionNegation::FunctionNegation ( const FunctionNegation right)

Definition at line 13 of file FunctionNegation.cc.

13 :
14 AbsFunction(right),
15 _arg1(right._arg1->clone())
16{
17}

◆ ~FunctionNegation()

Genfun::FunctionNegation::~FunctionNegation ( )
virtual

Definition at line 20 of file FunctionNegation.cc.

21{
22 delete _arg1;
23}

Member Function Documentation

◆ dimensionality()

unsigned int Genfun::FunctionNegation::dimensionality ( ) const
overridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 25 of file FunctionNegation.cc.

25 {
26 return _arg1->dimensionality();
27}
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79

◆ hasAnalyticDerivative()

virtual bool Genfun::FunctionNegation::hasAnalyticDerivative ( ) const
inlineoverridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 45 of file FunctionNegation.hh.

45{return true;}

◆ operator()() [1/2]

double Genfun::FunctionNegation::operator() ( const Argument argument) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 35 of file FunctionNegation.cc.

36{
37 return -((*_arg1)(x));
38}

◆ operator()() [2/2]

double Genfun::FunctionNegation::operator() ( double  argument) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 30 of file FunctionNegation.cc.

31{
32 return -((*_arg1)(x));
33}

◆ partial()

Derivative Genfun::FunctionNegation::partial ( unsigned int  index) const
overridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 41 of file FunctionNegation.cc.

41 {
42 const AbsFunction & fPrime = -(_arg1->partial(index));
43 return Derivative(&fPrime);
44}
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40
FunctionNoop Derivative
Definition: AbsFunction.hh:42

The documentation for this class was generated from the following files: