package orgeat

  1. Overview
  2. Docs
exception Random_from_list_empty_input
module StringMap : Stdlib.Map.S with type key = string
module StringMatrix : Stdlib.Map.S with type key = string * string
module Poly_Class : sig ... end
module Poly_Var : sig ... end
module LClassMap : sig ... end
module LVarMap : sig ... end
val random_from_list : (module Scalar.S with type t = 'k) -> ('k * 'a) list -> Stdlib.Random.State.t -> 'a

random_from_list state l picks a random element from l. Each element of l is given a weight which describes the distribution probability of l. An element with a bigger weight relative to the other elements of l will occur more frequently.

Bernouilli distribution. random_bern state x returns true with probability x, and false with probability 1-x.

val random_bern : (module Scalar.S with type t = 'k) -> 'k -> Stdlib.Random.State.t -> bool
val pp_tree : string -> string list list -> string list

pp_tree root_tag sub_trees prints a tree, from a tag for the root root_tag, and a list of sub-trees, each represented by its list of lines to print.

val pp_string_list : Stdlib.Format.formatter -> string list -> unit

pp_string_list formats a list of string by separating them with newlines