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

#include <FunctionTimesParameter.hh>

+ Inheritance diagram for Genfun::FunctionTimesParameter:

Public Member Functions

 FunctionTimesParameter (const AbsParameter *parameter, const AbsFunction *function)
 
 FunctionTimesParameter (const FunctionTimesParameter &right)
 
virtual ~FunctionTimesParameter ()
 
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 21 of file FunctionTimesParameter.hh.

Constructor & Destructor Documentation

◆ FunctionTimesParameter() [1/2]

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

Definition at line 9 of file FunctionTimesParameter.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

◆ FunctionTimesParameter() [2/2]

Genfun::FunctionTimesParameter::FunctionTimesParameter ( const FunctionTimesParameter right)

Definition at line 18 of file FunctionTimesParameter.cc.

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

◆ ~FunctionTimesParameter()

Genfun::FunctionTimesParameter::~FunctionTimesParameter ( )
virtual

Definition at line 28 of file FunctionTimesParameter.cc.

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

Member Function Documentation

◆ dimensionality()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 24 of file FunctionTimesParameter.cc.

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

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 47 of file FunctionTimesParameter.hh.

47{return true;}

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 41 of file FunctionTimesParameter.cc.

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

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 35 of file FunctionTimesParameter.cc.

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

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 49 of file FunctionTimesParameter.cc.

49 {
50 const AbsFunction & fPrime = (*_parameter)*(_function->partial(index));
51 return Derivative(&fPrime);
52}
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: