28 cout <<
"Verify Integral: " << endl;
30 cout << endl <<
"ComboApproximation and GaussLegendre 16 vs 32:" << endl;
34 function<double(double)> f1{bind(ftor.
getIntegral(), 0.0, std::placeholders::_1)};
35 function<double(double, double)> ff{
make_integral(quad, ftor)};
36 function<double(double)> f2{bind(ff, 0.0, std::placeholders::_1)};
38 const double d{
abs_diff(0.0, 3.0, 0.1, f1, f2)};
39 cout <<
"abs diff for integral function is: " << d << endl;
Elementary Quadrature Rules.
Integral getIntegral() const
Return the analytic integral object.
Integral< QuadAlgorithm, Integrand > make_integral(QuadAlgorithm const &quad, Integrand const &ftor)
Helper function that returns an Integral for a quadrature algorithm and a functor.
AGL (Adaptive GaussLegendre) Quadrature.
int main()
Demo use of the Integral wrapper.
The Integral wrapper template.
double abs_diff(double b, double e, double h, function< double(double)> f1, function< double(double)> f2)
AGL (Adaptive GaussLegendre) Quadrature.