1 #ifndef NPSTAT_FEJERQUADRATURE_HH_
2 #define NPSTAT_FEJERQUADRATURE_HH_
30 enum {interval_quadrature = 1};
37 inline unsigned npoints()
const {
return npoints_;}
52 template <
typename FcnResult,
typename FcnArg>
54 long double a,
long double b)
const;
65 std::vector<long double> a_;
66 std::vector<long double> w_;
67 mutable std::vector<std::pair<long double, long double> > buf_;
72 inline std::vector<double> abscissae2()
const
74 return std::vector<double>(a_.begin(), a_.end());
77 inline std::vector<double> weights2()
const
79 return std::vector<double>(w_.begin(), w_.end());
82 template <
typename FcnResult,
typename FcnArg>
83 inline double integrate2(
const Functor1<FcnResult,FcnArg>& fcn,
84 const double a,
const double b)
const
99 static std::shared_ptr<const FejerQuadrature> quad(
unsigned npoints);
102 typedef std::map<unsigned,std::shared_ptr<const FejerQuadrature> > FejerMap;
103 static FejerMap& getFejerMap();
107 #include "npstat/nm/FejerQuadrature.icc"
Base class for quadratures on the [-1, 1] interval.
Interface definitions and concrete simple functors for a variety of functor-based calculations.
Definition: AbsIntervalQuadrature1D.hh:19
Definition: FejerQuadrature.hh:97
Definition: FejerQuadrature.hh:28
long double integrate(const Functor1< FcnResult, FcnArg > &fcn, long double a, long double b) const
void getAllAbscissae(long double *abscissae, unsigned len) const
static unsigned minimalExactRule(unsigned polyDegree)
unsigned npoints() const
Definition: FejerQuadrature.hh:37
void getAllWeights(long double *weights, unsigned len) const
Definition: AbsArrayProjector.hh:14
Definition: SimpleFunctors.hh:58