Module Gsl_monte

module Gsl_monte: sig .. end
Gsl_monte Carlo Integration


High-level interface


type kind = 
| PLAIN
| MISER
| VEGAS
val integrate : kind ->
Gsl_fun.monte_fun ->
lo:float array -> up:float array -> int -> Gsl_rng.t -> Gsl_fun.result

Low-level interface



PLAIN algorithm


type plain_state 
val make_plain_state : int -> plain_state
val init_plain : plain_state -> unit
val integrate_plain : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> plain_state -> Gsl_fun.result

MISER algorithm


type miser_state 
type miser_params = {
   estimate_frac : float;
   min_calls : int;
   min_calls_per_bisection : int;
   miser_alpha : float;
   dither : float;
}
val make_miser_state : int -> miser_state
val init_miser : miser_state -> unit
val integrate_miser : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> miser_state -> Gsl_fun.result
val get_miser_params : miser_state -> miser_params
val set_miser_params : miser_state -> miser_params -> unit

VEGAS algorithm


type vegas_state 
type vegas_info = {
   result : float;
   sigma : float;
   chisq : float;
}
type vegas_mode = 
| STRATIFIED
| IMPORTANCE_ONLY
| IMPORTANCE
type vegas_params = {
   vegas_alpha : float; (*
1.5
*)
   iterations : int; (*
5
*)
   stage : int;
   mode : vegas_mode;
   verbose : int;
   ostream : Pervasives.out_channel option;
}
val make_vegas_state : int -> vegas_state
val init_vegas : vegas_state -> unit
val integrate_vegas : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> vegas_state -> Gsl_fun.result
val get_vegas_info : vegas_state -> vegas_info
val get_vegas_params : vegas_state -> vegas_params
val set_vegas_params : vegas_state -> vegas_params -> unit