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

#include <HermitePolynomial.hh>

+ Inheritance diagram for Genfun::HermitePolynomial:

Public Member Functions

 HermitePolynomial (unsigned int N)
 
 HermitePolynomial (const HermitePolynomial &right)
 
virtual ~HermitePolynomial ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
unsigned int N () const
 
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 HermitePolynomial.hh.

Constructor & Destructor Documentation

◆ HermitePolynomial() [1/2]

Genfun::HermitePolynomial::HermitePolynomial ( unsigned int  N)

Definition at line 11 of file HermitePolynomial.cc.

12:_N(N)
13{}
unsigned int N() const

◆ HermitePolynomial() [2/2]

Genfun::HermitePolynomial::HermitePolynomial ( const HermitePolynomial right)

Definition at line 18 of file HermitePolynomial.cc.

19 :AbsFunction(), _N(right._N)
20{ }

◆ ~HermitePolynomial()

Genfun::HermitePolynomial::~HermitePolynomial ( )
virtual

Definition at line 15 of file HermitePolynomial.cc.

15 {
16}

Member Function Documentation

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 46 of file HermitePolynomial.hh.

46{return true;}

◆ N()

unsigned int Genfun::HermitePolynomial::N ( ) const

Definition at line 37 of file HermitePolynomial.cc.

37 {
38 return _N;
39}

◆ operator()() [1/2]

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

Implements Genfun::AbsFunction.

Definition at line 37 of file HermitePolynomial.hh.

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

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 23 of file HermitePolynomial.cc.

23 {
24 const static double h00=0.0;
25 const static double h0=sqrt(M_PI/4.0);
26 double p0=h00;
27 double p1=h00;
28 double pn=h0;
29 for (unsigned int i=1;i<=_N;i++) {
30 p0=p1;
31 p1=pn;
32 pn=x*sqrt(2.0/i)*p1-sqrt((i-1.0)/i)*p0;
33 }
34 return pn;
35}

Referenced by operator()().

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 41 of file HermitePolynomial.cc.

41 {
42 assert(index==0);
43 if (_N>0) {
44 const AbsFunction & fPrime = sqrt(2.0*_N)*HermitePolynomial(_N-1);
45 return Derivative(& fPrime);
46 }
47 else {
48 const AbsFunction & fPrime = FixedConstant(0.0);
49 return Derivative(& fPrime);
50 }
51}
HermitePolynomial(unsigned int N)
FunctionNoop Derivative
Definition: AbsFunction.hh:42

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