public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Histogramming while VEGAS-integrating
@ 2003-06-27 17:59 Matteo Cacciari
  2003-06-30 17:34 ` Brian Gough
  0 siblings, 1 reply; 2+ messages in thread
From: Matteo Cacciari @ 2003-06-27 17:59 UTC (permalink / raw)
  To: gsl-discuss


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.

By checking the code, the weight seems to be given by jacbin * bin_vol,
and it is not passed to the integrand. While jacbin can be accessed from
gsl_monte_vegas_state, bin_vol apparently cannot, so that the full weight
cannot be retrieved for a given event.

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?

Thanks,

			Matteo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Histogramming while VEGAS-integrating
  2003-06-27 17:59 Histogramming while VEGAS-integrating Matteo Cacciari
@ 2003-06-30 17:34 ` Brian Gough
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Gough @ 2003-06-30 17:34 UTC (permalink / raw)
  To: Matteo Cacciari; +Cc: gsl-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-30 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 17:59 Histogramming while VEGAS-integrating Matteo Cacciari
2003-06-30 17:34 ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).