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

#include <ConstPlusFunction.hh>

+ Inheritance diagram for Genfun::ConstPlusFunction:

Public Member Functions

 ConstPlusFunction (double constant, const AbsFunction *arg)
 
 ConstPlusFunction (const ConstPlusFunction &right)
 
virtual ~ConstPlusFunction ()
 
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 20 of file ConstPlusFunction.hh.

Constructor & Destructor Documentation

◆ ConstPlusFunction() [1/2]

Genfun::ConstPlusFunction::ConstPlusFunction ( double  constant,
const AbsFunction arg 
)

Definition at line 8 of file ConstPlusFunction.cc.

8 :
9 _constant(constant),
10 _arg(arg->clone())
11{
12}

◆ ConstPlusFunction() [2/2]

Genfun::ConstPlusFunction::ConstPlusFunction ( const ConstPlusFunction right)

Definition at line 14 of file ConstPlusFunction.cc.

14 :
15AbsFunction(right),
16_constant(right._constant),
17_arg(right._arg->clone())
18{}

◆ ~ConstPlusFunction()

Genfun::ConstPlusFunction::~ConstPlusFunction ( )
virtual

Definition at line 24 of file ConstPlusFunction.cc.

25{
26 delete _arg;
27}

Member Function Documentation

◆ dimensionality()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 20 of file ConstPlusFunction.cc.

20 {
21 return _arg->dimensionality();
22}
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 46 of file ConstPlusFunction.hh.

46{return true;}

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 37 of file ConstPlusFunction.cc.

38{
39 return _constant + (*_arg)(x);
40}

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 31 of file ConstPlusFunction.cc.

32{
33 return _constant + (*_arg)(x);
34}

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 43 of file ConstPlusFunction.cc.

43 {
44 return _arg->partial(index);
45}
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40

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