How to implement an integrator function?

The following ROOT page gives examples to implement numerical integration in ROOT:
root.cern.ch/drupal/content/function-integration

I would like to implement my own integrator function and compare to the results from the various gsl,ROOT integrator functions(ADAPTIVE,SINGULAR,etc…)

The function I have is of the form:
double dgauss(double (*f)(double&), double &a, double &b, double &eps).

Is there a way to wrap this similar to the way Functor works?
I would want something like:
ROOT::Math::Integrator ig1(“MyIntegrator”);

Thanks!

Hi,

first sorry for the late replay. I missed your post.

For implementing your own integrator and plug-in the system you need to implement the VirtualIntegrator interface using your code. You can then (with the plug-in manager) automatically have your class available and used as the others. You need to add a new plug-in in $ROOTSYS/etc/plugins/ROOT@@Math@@VirtualIntegrator or you can add the plug-in at run-time (see the doc for the class TPluginManager)

If you have further question, please let me know

Lorenzo