36 class Integrand_Wrapper
38 typedef double(*Ftn)(double);
41 explicit Integrand_Wrapper(Ftn f): _f(f) {}
42 double operator()(
double x)
const {
return _f(x);}
46 template double quad(Integrand_Wrapper,
double,
double,
double);
47 template double quadl(Integrand_Wrapper,
double,
double,
double);
50 double quad(
double(*f)(
double),
double a,
double b,
53 return quad(Integrand_Wrapper(f), a, b, tol);
57 double quadl(
double(*f)(
double),
double a,
double b,
double tol)
59 return quadl(Integrand_Wrapper(f), a, b, tol);