MUQ  0.4.3
PhysicistHermite.cpp
Go to the documentation of this file.
2 
3 #include <cmath>
4 
5 using namespace muq::Approximation;
6 
8 
10 
11 double PhysicistHermite::DerivativeEvaluate(int const polyOrder, int const derivOrder, double const x) const {
12 
13  if((derivOrder > polyOrder) || (polyOrder==0))
14  return 0.0;
15 
16  double c = 1.0;
17  for(int k=polyOrder; k>polyOrder-derivOrder; --k)
18  c *= 2.0*k;
19 
20  return c*BasisEvaluate(polyOrder-derivOrder, x);
21 }
22 
23 double PhysicistHermite::ak(unsigned int k) const{
24  return 2.0;
25 }
26 double PhysicistHermite::bk(unsigned int k) const{
27  return 0.0;
28 }
29 double PhysicistHermite::ck(unsigned int k) const{
30  return 2.0*(k-1.0);
31 }
32 
33 double PhysicistHermite::Normalization(unsigned int polyOrder) const {
34  return sqrt(M_PI) * pow(2.0, static_cast<double>(polyOrder)) * std::tgamma(polyOrder+1);
35 }
36 
37 double PhysicistHermite::phi0(double x) const {
38  return 1.0;
39 }
40 
41 double PhysicistHermite::phi1(double x) const {
42  return 2.0*x;
43 }
44 
45 REGISTER_SCALARBASIS_FAMILY(PhysicistHermite)
virtual double BasisEvaluate(int const order, double const x) const override
Evaluate the specific polynomial type (must be implemented by the child)
virtual double DerivativeEvaluate(int const polyOrder, int const derivOrder, double const x) const override
virtual double ak(unsigned int k) const override
Implement .
virtual double phi1(double x) const override
Implement .
virtual double phi0(double x) const override
Implement .
virtual double bk(unsigned int k) const override
Implement .
virtual double ck(unsigned int k) const override
Implement .
virtual double Normalization(unsigned int polyOrder) const override