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

#include <FunctionNumDeriv.hh>

+ Inheritance diagram for Genfun::FunctionNumDeriv:

Public Member Functions

 FunctionNumDeriv (const AbsFunction *arg1, unsigned int index=0)
 
 FunctionNumDeriv (const FunctionNumDeriv &right)
 
virtual ~FunctionNumDeriv ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
virtual unsigned int dimensionality () 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 FunctionNumDeriv.hh.

Constructor & Destructor Documentation

◆ FunctionNumDeriv() [1/2]

Genfun::FunctionNumDeriv::FunctionNumDeriv ( const AbsFunction arg1,
unsigned int  index = 0 
)

Definition at line 12 of file FunctionNumDeriv.cc.

12 :
13 _arg1(arg1->clone()),
14 _wrtIndex(index)
15{
16}

◆ FunctionNumDeriv() [2/2]

Genfun::FunctionNumDeriv::FunctionNumDeriv ( const FunctionNumDeriv right)

Definition at line 18 of file FunctionNumDeriv.cc.

18 :
19 AbsFunction(right),
20 _arg1(right._arg1->clone()),
21 _wrtIndex(right._wrtIndex)
22{
23}

◆ ~FunctionNumDeriv()

Genfun::FunctionNumDeriv::~FunctionNumDeriv ( )
virtual

Definition at line 26 of file FunctionNumDeriv.cc.

27{
28 delete _arg1;
29}

Member Function Documentation

◆ dimensionality()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 31 of file FunctionNumDeriv.cc.

31 {
32 return _arg1->dimensionality();
33}
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 55 of file FunctionNumDeriv.cc.

56{
57 assert (_wrtIndex<x.dimension());
58 _xArg = x;
59 double xx = x[_wrtIndex];
60 return numericalDerivative ( &FunctionNumDeriv::f_Arg, xx );
61}

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 49 of file FunctionNumDeriv.cc.

50{
51 assert (_wrtIndex==0);
52 return numericalDerivative ( &FunctionNumDeriv::f_x, x );
53}

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