module BatIMap:sig..end
type 'a t
typekey =int
val empty : eq:('a -> 'a -> bool) -> 'a tval singleton : eq:('a -> 'a -> bool) -> int -> 'a -> 'a t
val is_empty : 'a t -> boolval add : int -> 'a -> 'a t -> 'a tadd x y t adds a binding from x to y in t, returning a new map.val add_range : int -> int -> 'a -> 'a t -> 'a tadd lo hi y t adds bindings to y for all values in the range
lo,hi, returning a new mapval find : int -> 'a t -> 'afind x t returns the y that is bound to x in t.Not_found if x is unboundval modify : int -> ('a -> 'a) -> 'a t -> 'a tmodify x f t replaces the y that is bound to x in t by f y.Not_found if x is unboundval modify_def : 'a -> int -> ('a -> 'a) -> 'a t -> 'a tmodify_def dft x f t does the same as modify x f t but binds
x to f dft if x was not bound.val modify_opt : int -> ('a option -> 'a option) -> 'a t -> 'a tmodify_opt x f t allows to modify the binding for x in t
or absence thereof.val remove : int -> 'a t -> 'a tval remove_range : int -> int -> 'a t -> 'a tval from : int -> 'a t -> 'a tx,max_intval after : int -> 'a t -> 'a tx+1,max_intval until : int -> 'a t -> 'a tmin_int, xval before : int -> 'a t -> 'a tmin_int, x-1val mem : int -> 'a t -> boolval iter : (int -> 'a -> unit) -> 'a t -> unititer f t calls f on every bindingval iter_range : (int -> int -> 'a -> unit) -> 'a t -> unititer_range f t calls f on every contiguous range. For maps, contiguous ranges must map to the same yval map : ?eq:('b -> 'b -> bool) -> ('a -> 'b) -> 'a t -> 'b ty by the given function.
This will not create new ranges; the mapping function is only
applied to each contiguous range once. It is not applied to the
ranges in order. ~eq defaults to (=).val mapi : ?eq:('b -> 'b -> bool) -> (int -> 'a -> 'b) -> 'a t -> 'b t~eq defaults to (=).val map_range : ?eq:('b -> 'b -> bool) ->
(int -> int -> 'a -> 'b) -> 'a t -> 'b ty using the given function.
This will not create new ranges, but will have access to the
lo,hi of the current range. ~eq defaults to (=).val fold : (int -> 'b -> 'a -> 'a) -> 'b t -> 'a -> 'afold f t x0 folds all the bindings of t into x0 using f to
merge.val fold_range : (int -> int -> 'b -> 'a -> 'a) -> 'b t -> 'a -> 'afold_range f t x0 folds all the contiguous ranges of t into
x0 using f to merge. The order of foldings is unspecified.val set_to_map : ?eq:('a -> 'a -> bool) -> BatISet.t -> 'a -> 'a tset_to_map s x returns a map where every element of s is bound
to x.val domain : 'a t -> BatISet.tdomain t returns the set of ints that are bound in tval map_to_set : ('a -> bool) -> 'a t -> BatISet.tmap_to_set p t returns the set of keys of t where p
evaluates as trueval enum : 'a t -> (int * int * 'a) BatEnum.tenum t returns an enumeration of the bindings in tval of_enum : eq:('a -> 'a -> bool) -> (int * int * 'a) BatEnum.t -> 'a tof_enum e returns the set of given rangesval fold2_range : (int -> int -> 'a option -> 'b option -> 'c -> 'c) ->
'a t -> 'b t -> 'c -> 'cfold2_range f t u x0 folds across each range that's defined in
either t or u or both, giving that range and the possible values
to f to merge with x0.
Example: let union_first = fold2_range (fun _lo _hi a b = match a,b with Some x,_ -> x | _,Some y -> y)
val union : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a tval merge : ?eq:('c -> 'c -> bool) ->
(int -> int -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val forall2_range : (int -> int -> 'a option -> 'b option -> bool) ->
'a t -> 'b t -> bool
val get_dec_eq : 'a t -> 'a -> 'a -> boolmodule Infix:sig..end
BatIMap