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

#include <FloatingConstant.hh>

+ Inheritance diagram for Genfun::FloatingConstant:

Public Member Functions

 FloatingConstant (const AbsParameter &p)
 
 FloatingConstant (const FloatingConstant &right)
 
virtual ~FloatingConstant ()
 
AbsParametervalue ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) 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 24 of file FloatingConstant.hh.

Constructor & Destructor Documentation

◆ FloatingConstant() [1/2]

Genfun::FloatingConstant::FloatingConstant ( const AbsParameter p)

Definition at line 9 of file FloatingConstant.cc.

9 :
10 _value(p.clone())
11{
12 if (_value->parameter() && p.parameter()) _value->parameter()->connectFrom(&p);
13}
virtual Parameter * parameter()
Definition: AbsParameter.hh:42
void connectFrom(const AbsParameter *source)
Definition: Parameter.cc:95
virtual Parameter * parameter()
Definition: Parameter.hh:81

◆ FloatingConstant() [2/2]

Genfun::FloatingConstant::FloatingConstant ( const FloatingConstant right)

Definition at line 15 of file FloatingConstant.cc.

15 :
16 AbsFunction(right), _value(right._value->clone()) {
17}

◆ ~FloatingConstant()

Genfun::FloatingConstant::~FloatingConstant ( )
virtual

Definition at line 19 of file FloatingConstant.cc.

20{
21}

Member Function Documentation

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 50 of file FloatingConstant.hh.

50{return true;}

◆ operator()() [1/2]

virtual double Genfun::FloatingConstant::operator() ( const Argument a) const
inlineoverridevirtual

Implements Genfun::AbsFunction.

Definition at line 44 of file FloatingConstant.hh.

44{return operator() (a[0]);}
virtual double operator()(double argument) const override

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 27 of file FloatingConstant.cc.

28{
29 return _value->getValue();
30}
virtual double getValue() const =0

Referenced by operator()().

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 43 of file FloatingConstant.cc.

43 {
44 assert(index==0);
45 FixedConstant fPrime(0.0);
46 return Derivative(&fPrime);
47}
FunctionNoop Derivative
Definition: AbsFunction.hh:42

◆ value()

AbsParameter & Genfun::FloatingConstant::value ( )

Definition at line 23 of file FloatingConstant.cc.

23 {
24 return *_value;
25}

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