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

#include <FunctionPlusParameter.hh>

+ Inheritance diagram for Genfun::FunctionPlusParameter:

Public Member Functions

 FunctionPlusParameter (const AbsParameter *parameter, const AbsFunction *function)
 
 FunctionPlusParameter (const FunctionPlusParameter &right)
 
virtual ~FunctionPlusParameter ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) 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 FunctionPlusParameter.hh.

Constructor & Destructor Documentation

◆ FunctionPlusParameter() [1/2]

Genfun::FunctionPlusParameter::FunctionPlusParameter ( const AbsParameter parameter,
const AbsFunction function 
)

Definition at line 9 of file FunctionPlusParameter.cc.

9 :
10 _function(function->clone()),
11 _parameter(parameter->clone())
12{
13 if (parameter->parameter() && _parameter->parameter()) {
14 _parameter->parameter()->connectFrom(parameter->parameter());
15 }
16}
virtual Parameter * parameter()
Definition: AbsParameter.hh:42
void connectFrom(const AbsParameter *source)
Definition: Parameter.cc:95

◆ FunctionPlusParameter() [2/2]

Genfun::FunctionPlusParameter::FunctionPlusParameter ( const FunctionPlusParameter right)

Definition at line 18 of file FunctionPlusParameter.cc.

18 :
19 AbsFunction(right),
20 _function(right._function->clone()),
21 _parameter(right._parameter->clone())
22{}

◆ ~FunctionPlusParameter()

Genfun::FunctionPlusParameter::~FunctionPlusParameter ( )
virtual

Definition at line 28 of file FunctionPlusParameter.cc.

29{
30 delete _function;
31 delete _parameter;
32}

Member Function Documentation

◆ dimensionality()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 24 of file FunctionPlusParameter.cc.

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

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 46 of file FunctionPlusParameter.hh.

46{return true;}

◆ operator()() [1/2]

double Genfun::FunctionPlusParameter::operator() ( const Argument a) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 41 of file FunctionPlusParameter.cc.

42{
43 return _parameter->getValue() + (*_function)(x);
44}
virtual double getValue() const =0

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 35 of file FunctionPlusParameter.cc.

36{
37 return _parameter->getValue() + (*_function)(x);
38}

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 46 of file FunctionPlusParameter.cc.

46 {
47 return _function->partial(index);
48}
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40

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