package feat-core

  1. Overview
  2. Docs
Facilities for enumerating and sampling algebraic data types

Install

Dune Dependency

Authors

Maintainers

Sources

archive.tar.gz
md5=f8548ba0792a07d2b72c7894d1089d5e
sha512=6c53ad4f898c074b888018269fe2c00bf001fb5b22ceade1e7e26479fbe9ef55fe97d04a757b10232565a6af8f51d960b6f5f494552df4205aba046b075c513b

doc/src/feat-core/RandomSig.ml.html

Source file RandomSig.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(******************************************************************************)
(*                                                                            *)
(*                                     Feat                                   *)
(*                                                                            *)
(*                        François Pottier, Inria Paris                       *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the MIT license, as described in the file LICENSE.               *)
(******************************************************************************)

(** A subset of the signature of the module {!Stdlib.Random}. *)
module type S = sig

  module State : sig

    (** The state of the random number generator. *)
    type t

    (** [bits s] returns 30 random bits in a nonnegative integer. *)
    val bits : t -> int

    (** [int bound] returns a random integer comprised between 0 (inclusive)
        and [bound] (exclusive). [bound] must be greater than 0 and less than
        2{^30}. *)
    val int : t -> int -> int

  end

  (** [get_state()] returns the current state of the generator. *)
  val get_state : unit -> State.t

end
OCaml

Innovation. Community. Security.