package urn

  1. Overview
  2. Docs

Parameters

Signature

type weight = Weight.t
type !+'a t
val singleton : weight -> 'a -> 'a t
val of_list : (weight * 'a) list -> 'a t option
val sample : 'a t -> 'a
val remove : 'a t -> (weight * 'a) * 'a t option
val add : weight -> 'a -> 'a t -> 'a t
val add_seq : (weight * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val add_list : (weight * 'a) list -> 'a t -> 'a t
val update : (weight -> 'a -> weight * 'a) -> 'a t -> (weight * 'a) * (weight * 'a) * 'a t
val update_opt : (weight -> 'a -> (weight * 'a) option) -> 'a t -> (weight * 'a) * (weight * 'a) option * 'a t option
val replace : weight -> 'a -> 'a t -> (weight * 'a) * 'a t
val size : 'a t -> int
val weight : 'a t -> weight
OCaml

Innovation. Community. Security.