Indexer.Make
module E : Elt
type t
val size : t -> int
Number of elements in the collection. Constant time.
val mem : E.t -> t -> bool
Log complexity.
val get : int -> t -> E.t
raises Not_found. Log complexity.
val index : E.t -> t -> int
raise Not_found. Log complexity.
val is_empty : t -> bool
val empty : t
val add : E.t -> t -> t
val remove : E.t -> t -> t
val filter : (E.t -> bool) -> t -> t
Linear.
val update : E.t option -> E.t option -> t -> int * int * t
update x y t replaces x by y and returns the range a..b of modified indices. Log complexity.
update x y t
x
y
a..b
val iter : (E.t -> unit) -> t -> unit
val iteri : (int -> E.t -> unit) -> t -> unit