package gsl

  1. Overview
  2. Docs

Gsl_monte Carlo Integration

High-level interface

type kind =
  1. | PLAIN
  2. | MISER
  3. | 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 = {
  1. estimate_frac : float;
  2. min_calls : int;
  3. min_calls_per_bisection : int;
  4. miser_alpha : float;
  5. 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 = {
  1. result : float;
  2. sigma : float;
  3. chisq : float;
}
type vegas_mode =
  1. | STRATIFIED
  2. | IMPORTANCE_ONLY
  3. | IMPORTANCE
type vegas_params = {
  1. vegas_alpha : float;
    (*

    1.5

    *)
  2. iterations : int;
    (*

    5

    *)
  3. stage : int;
  4. mode : vegas_mode;
  5. verbose : int;
  6. 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
OCaml

Innovation. Community. Security.