Histogramming while VEGAS-integrating

Brian Gough bjg@network-theory.co.uk
Mon Jun 30 17:34:00 GMT 2003


Matteo Cacciari writes:
 > The FORTRAN version of the VEGAS Monte Carlo integration routine
 > passes a weight to the integrand function, so that one can collect
 > it and the function value while integrating, and build histograms
 > for various differential distributions.
 > 
 > This option does not seem to be available when using
 > gsl_monte_vegas_integrate.
 >
 > Am I correct? If so, does anybody have a workaround which does not
 > involve patching the GSL routine? Could perhaps this feature be
 > included in a future release?

I don't know of any obvious way to access the weight.

It's missing because the three monte-carlo integration routines were
designed to be interchangeable, and the other two didn't use weights.

If you need it the simplest thing is to copy the source files into
your project and modify them.

The appropriate way to implement it in GSL would be to provide a
separate routine which returns sample points and weights so that the
user can caculate any quantity.

Brian



More information about the Gsl-discuss mailing list