Function Integration Page Needs Updating

Hi, the page at https://root.cern.ch/drupal/content/function-integration needs to be updated.

  1. the non-plug-in examples all use a TF1 as example, with the WrappedTF1 class allowing it to be passed to the integrator object. It would be nice to have an example with a regular C++ function that avoids the TF1 and the WrappedTF1 classes, like in the plug-in section.

  2. In all the examples, the when the method “SetFunction” of the integrator object (called “ig”) is called, the arguments are SetFunction(wf1,false). From my tests, the second argument should not be there, and you get a compiler error if you put it there.

  3. The plug-in section examples have a lot of unnecessary cruft. Why is an integer status code collected and returned? The examples should be more minimal, and additional non-essential code should be explained with comments (e.g. the RESULT variable, why is it 0.5? It’s easy to figure out if you know what the integrator is actually doing, but it’s confusing to a first-time reader because it’s at the top. It’s not obvious that this is the known analytic result.)

Thanks!
Jean-François

Hi,

Thank you for your suggestions. We will update the doc as you suggest.
It is true the method SetFunction has two arguments only in the case of the interface class, ROOT::Math::Integrator but not for the implementation classes, e.g. GaussIntegrator.

We are also moving this documentation in the User Guide, see for example

root.cern.ch/root/htmldoc/guide … ntegration

We will update then the examples also there

Thank you for reporting these errors and the suggestions

Lorenzo