MUQ  0.4.3
OrthogonalPolynomial.h
Go to the documentation of this file.
1 #ifndef ORTHOGONALPOLYNOMIAL_H_
2 #define ORTHOGONALPOLYNOMIAL_H_
3 
4 #include <functional>
5 #include <string>
6 
8 
9 namespace muq {
10  namespace Approximation {
11 
12  class GaussQuadrature;
13 
32 
33  friend class GaussQuadrature;
34 
35  public:
36 
39 
40  static std::shared_ptr<OrthogonalPolynomial> Construct(std::string const& polyName);
41 
42  virtual ~OrthogonalPolynomial() = default;
43 
45 
53  virtual double BasisEvaluate(int const order, double const x) const override;
54 
55  virtual Eigen::VectorXd EvaluateAllTerms(int const maxOrder,
56  double const x) const override;
57 
68  virtual double Normalization(unsigned int polyOrder) const;
69 
70 
71  private:
72 
74 
77  virtual double ak(unsigned int k) const = 0;
78 
80 
83  virtual double bk(unsigned int k) const = 0;
84 
86 
89  virtual double ck(unsigned int k) const = 0;
90 
92 
95  virtual double phi0(double x) const = 0;
96 
98 
101  virtual double phi1(double x) const = 0;
102  };
103  } // namespace Approximation
104 } // namespace muq
105 
106 
107 #endif
Class for computing Gauss Quadrature rules from an orthogonal polynomial family.
virtual double Normalization(unsigned int polyOrder) const
virtual double BasisEvaluate(int const order, double const x) const override
Evaluate the specific polynomial type (must be implemented by the child)
virtual double phi1(double x) const =0
Implement .
static std::shared_ptr< OrthogonalPolynomial > Construct(std::string const &polyName)
virtual double phi0(double x) const =0
Implement .
virtual double ak(unsigned int k) const =0
Implement .
virtual double ck(unsigned int k) const =0
Implement .
virtual double bk(unsigned int k) const =0
Implement .
virtual Eigen::VectorXd EvaluateAllTerms(int const maxOrder, double const x) const override
Evaluates all basis functions with order <= maxOrder.