Class for computing Gauss Quadrature rules from an orthogonal polynomial family. More...
#include <GaussQuadrature.h>
Class for computing Gauss Quadrature rules from an orthogonal polynomial family.
Uses the Golub-Welsch algorithm to construct a Gauss Quadrature rule of a specified order.
Definition at line 20 of file GaussQuadrature.h.
Public Member Functions | |
GaussQuadrature () | |
virtual | ~GaussQuadrature ()=default |
GaussQuadrature (std::shared_ptr< OrthogonalPolynomial > polyIn) | |
GaussQuadrature (std::shared_ptr< OrthogonalPolynomial > polyIn, int polyOrderIn) | |
virtual void | Compute (unsigned int quadOrder) override |
virtual unsigned int | Exactness (unsigned int quadOrder) const override |
Public Member Functions inherited from muq::Approximation::Quadrature | |
Quadrature (unsigned int dimIn) | |
virtual | ~Quadrature ()=default |
virtual void | Compute (Eigen::RowVectorXi const &orders) |
virtual unsigned int | Dim () const |
virtual Eigen::MatrixXd const & | Points () const |
virtual Eigen::VectorXd const & | Weights () const |
GaussQuadrature::GaussQuadrature | ( | ) |
Definition at line 5 of file GaussQuadrature.cpp.
|
virtualdefault |
GaussQuadrature::GaussQuadrature | ( | std::shared_ptr< OrthogonalPolynomial > | polyIn | ) |
Definition at line 7 of file GaussQuadrature.cpp.
GaussQuadrature::GaussQuadrature | ( | std::shared_ptr< OrthogonalPolynomial > | polyIn, |
int | polyOrderIn | ||
) |
Definition at line 12 of file GaussQuadrature.cpp.
References Compute().
|
overridevirtual |
Implements muq::Approximation::Quadrature.
Definition at line 19 of file GaussQuadrature.cpp.
References poly, polyOrder, muq::Approximation::Quadrature::pts, and muq::Approximation::Quadrature::wts.
Referenced by ConstructDensity(), and GaussQuadrature().
|
inlineoverridevirtual |
Returns the order of the polynomial that can be integrated exactly by this quadrature rule. An \(n\)-point Gauss quadrature rule integrates polynomials of order \(2n-1\) exactly. Thus, since \(n\)= quadOrder+1, for Gauss quadrature rules, this function will return 2*quadOrder+1.
In the multivariate tensor product rule, the maximum exactness across all dimensions is returned.
If not exactness information is known (or implemented) for a particular quadrature rule, an exception will be thrown.
Reimplemented from muq::Approximation::Quadrature.
Definition at line 35 of file GaussQuadrature.h.
|
private |
Definition at line 39 of file GaussQuadrature.h.
Referenced by Compute().
|
private |
Definition at line 41 of file GaussQuadrature.h.
Referenced by Compute().