This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Histogramming while VEGAS-integrating
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Matteo Cacciari <Matteo dot Cacciari at cern dot ch>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Mon, 30 Jun 2003 18:34:04 +0100
- Subject: Re: Histogramming while VEGAS-integrating
- References: <Pine.LNX.4.44.0306271756110.14617-100000@lxplus090.cern.ch>
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