Gsl.Rng
Random Number Generation
type rng_type =
| BOROSH13
| COVEYOU
| CMRG
| FISHMAN18
| FISHMAN20
| FISHMAN2X
| GFSR4
| KNUTHRAN
| KNUTHRAN2
| KNUTHRAN2002
| LECUYER21
| MINSTD
| MRG
| MT19937
| MT19937_1999
| MT19937_1998
| R250
| RAN0
| RAN1
| RAN2
| RAN3
| RAND
| RAND48
| RANDOM128_BSD
| RANDOM128_GLIBC2
| RANDOM128_LIBC5
| RANDOM256_BSD
| RANDOM256_GLIBC2
| RANDOM256_LIBC5
| RANDOM32_BSD
| RANDOM32_GLIBC2
| RANDOM32_LIBC5
| RANDOM64_BSD
| RANDOM64_GLIBC2
| RANDOM64_LIBC5
| RANDOM8_BSD
| RANDOM8_GLIBC2
| RANDOM8_LIBC5
| RANDOM_BSD
| RANDOM_GLIBC2
| RANDOM_LIBC5
| RANDU
| RANF
| RANLUX
| RANLUX389
| RANLXD1
| RANLXD2
| RANLXS0
| RANLXS1
| RANLXS2
| RANMAR
| SLATEC
| TAUS
| TAUS_2
| TAUS_113
| TRANSPUTER
| TT800
| UNI
| UNI32
| VAX
| WATERMAN14
| ZUF
val default : unit -> rng_type
val set_default : rng_type -> unit
val set : t -> nativeint -> unit
val name : t -> string
warning : the nativeint used for seeds are in fact unsigned but ocaml treats them as signed. But you can still print them using %nu with printf functions.
val max : t -> nativeint
val min : t -> nativeint
val dump_state : t -> string * string
val set_state : t -> (string * string) -> unit
val get : t -> nativeint
val uniform : t -> float
val uniform_pos : t -> float
val uniform_int : t -> int -> int
These function fill the array with random numbers :
val uniform_arr : t -> float array -> unit
val uniform_pos_arr : t -> float array -> unit