This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Histogramming while VEGAS-integrating


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]