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

#include <Erf.hh>

+ Inheritance diagram for Genfun::Erf:

Public Member Functions

 Erf ()
 
 Erf (const Erf &right)
 
virtual ~Erf ()
 
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 20 of file Erf.hh.

Constructor & Destructor Documentation

◆ Erf() [1/2]

Genfun::Erf::Erf ( )

Definition at line 12 of file Erf.cc.

13{
14 _incompleteGamma.a().setValue(0.5);
15}
void setValue(double value)
Definition: Parameter.cc:59

◆ Erf() [2/2]

Genfun::Erf::Erf ( const Erf right)

Definition at line 17 of file Erf.cc.

17 :
18 AbsFunction(right), _incompleteGamma(right._incompleteGamma)
19{
20}

◆ ~Erf()

Genfun::Erf::~Erf ( )
virtual

Definition at line 22 of file Erf.cc.

22 {
23}

Member Function Documentation

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 43 of file Erf.hh.

43{return true;}

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 37 of file Erf.hh.

37{return operator() (a[0]);}
virtual double operator()(double argument) const override
Definition: Erf.cc:25

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 25 of file Erf.cc.

25 {
26 return x<0 ? -_incompleteGamma(x*x): _incompleteGamma(x*x);
27}

Referenced by operator()().

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 40 of file Erf.cc.

40 {
41 assert(index==0);
42 Gaussian gauss = Gaussian();
43 gauss.sigma().setValue(sqrt(2.0));
44 const AbsFunction & fPrime = 2.0*gauss;
45 return Derivative(& fPrime);
46}
FunctionNoop Derivative
Definition: AbsFunction.hh:42

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