Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Store module used to store nodes of the partially ordered map.
module Ix : Store_intf.INDEX
Index module used to index elements in the store
val empty : 'a t
The empty store
val is_empty : 'a t -> bool
is_empty s
val cardinal : 'a t -> int
cardinal s
update ix el s
rebinds index ix
in store s
to point to el
, and returns the resulting store. The previous binding disappears. New indices resulting from further adds are guaranteed to have higher indices.
remove ix s
removes the binding of index ix
of store s
, and returns the resulting store.
val iter : ('a -> unit) -> 'a t -> unit
iter f s
applies f
to all stored elements in store s
. The order in which elements are passed to f
is unspecified.
iter f s
applies f
to all indexes and their related elements in store s
. The order in which elements are passed to f
is unspecified.
mapi f s
same as map
, but function f
also receives the index associated with the elements.
val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
fold f s a
computes (f eN ... (f e1 a) ...)
, where e1 ... eN
are the elements of all bindings in store s
. The order in which the bindings are presented to f
is unspecified.
foldi f s a
same as fold
, but function f
also receives the index associated with the elements.
to_list s
converts s
to an association list of indices and elements.
val get_ix_map : 'a t -> 'a Ix.Map.t
get_ix_map s