Obviously, there are a couple of numerical C-recipes to get the job done.
However, I was wondering if there is ROOT way to do it. More specifically,
using GLSIntegrator. I am going through the documentation (including the
mathmore/test folder) but it seems to me that GSL integrands requires a
regular region for the integration limit e.g.,
|+1 |+c
| |
| dx | dy f(x,y)
| |
|-1 |-d
Am I totally misunderstanding the documentation? Otherwise, could you please point me to the right direction!
Thank you very much for the example. It worked beautifully! However, just to check my understanding, I made an attempt (albeit childish!) to generalize your example to a TripleIntegral. It quits with some bus errors.
I attach my attempt! I would greatly appreciate if you would take a look at it (time permitting of course!).
This avoids the copying of the IntegrandFunctionX object, which has as data member a pointer to a GSLIntegrator and therefore it is not handled correctly.
It is strange that using ACLIC you did not get a compiler error, due to the private copy constructor of IntegrandFunctionX . Compiling directly the macro you will have this error.