devkit

Development kit - general purpose library
IN THIS PACKAGE
Module Devkit_core . Cache . Count
type 'a t
val create : unit -> 'a t
val of_list : ('a * int) list -> 'a t
val of_enum : ('a * int) Enum.t -> 'a t
val clear : 'a t -> unit
val add : 'a t -> 'a -> unit
val plus : 'a t -> 'a -> int -> unit
val del : 'a t -> 'a -> unit
val minus : 'a t -> 'a -> int -> unit
val enum : 'a t -> ('a * int) Enum.t
val iter : 'a t -> ( 'a -> int -> unit ) -> unit
val fold : 'a t -> ( 'a -> int -> 'b -> 'b ) -> 'b -> 'b
val count : 'a t -> 'a -> int

number of times given element was seen

val count_all : 'a t -> int
val size : 'a t -> int

number of distinct elements

val show : 'a t -> ?sep:string -> ( 'a -> string ) -> string
val show_sorted : 'a t -> ?limit:int -> ?sep:string -> ( 'a -> string ) -> string
val stats : 'a t -> ?cmp:( 'a -> 'a -> int ) -> ( 'a -> string ) -> string
val report : 'a t -> ?limit:int -> ?cmp:( 'a -> 'a -> int ) -> ?sep:string -> ( 'a -> string ) -> string
val distrib : float t -> float array
val show_distrib : ?sep:string -> float t -> string
val names : 'a t -> 'a list