Hi, the page at https://root.cern.ch/drupal/content/function-integration needs to be updated.
-
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.
-
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.
-
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