Integration of 1D real functions

Header file integ.h

The class and methods defined here allow the integration of a real function. Each user-defined function to be integrated should be defined as a method in a class which inherits from the class defining the integration methods.

Integrator class, Real_integrable

Expects subclasses to define a function of a real number, which is the function to be integrated. To integrate the function, the class is used as follows:
  1. Define a subclass which inherits from this class for the particular function to be integrated.
  2. Define a method in the class to calculate the function:
       double operator()(const double x) const
       
  3. Call the appropriate integration method: