Module Gsl_monte


module Gsl_monte: sig  end
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 alloc_plain : int -> plain_state
val init_plain : plain_state -> unit
val free_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 alloc_miser : int -> miser_state
val init_miser : miser_state -> unit
val free_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 alloc_vegas : int -> vegas_state
val init_vegas : vegas_state -> unit
val free_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