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