1
(* $Id: iMap.mli,v 1.3 2003/06/18 15:11:07 yori Exp $ *)
2
(* Copyright 2003 Yamagata Yoriyuki. distributed with LGPL *)
4
type +'a t = (int * int * 'a) AvlTree.tree
10
val is_empty : 'a t -> bool
12
val add : ?eq:('a -> 'a -> bool) -> int -> 'a -> 'a t -> 'a t
14
val add_range : ?eq:('a -> 'a -> bool) -> int -> int -> 'a -> 'a t -> 'a t
16
val find : int -> 'a t -> 'a
18
val remove : int -> 'a t -> 'a t
20
val remove_range : int -> int -> 'a t -> 'a t
22
val from : int -> 'a t -> 'a t
24
val after : int -> 'a t -> 'a t
26
val until : int -> 'a t -> 'a t
28
val before : int -> 'a t -> 'a t
30
val mem : int -> 'a t -> bool
32
val iter : (int -> 'a -> unit) -> 'a t -> unit
34
val iter_range : (int -> int -> 'a -> unit) -> 'a t -> unit
36
val map : ?eq:('b -> 'b -> bool) -> ('a -> 'b) -> 'a t -> 'b t
38
val mapi : ?eq:('b -> 'b -> bool) -> (int -> 'a -> 'b) -> 'a t -> 'b t
40
val fold : (int -> 'b -> 'a -> 'a) -> 'b t -> 'a -> 'a
42
val fold_range : (int -> int -> 'b -> 'a -> 'a) -> 'b t -> 'a -> 'a
44
val set_to_map : ISet.t -> 'a -> 'a t
46
val domain : 'a t -> ISet.t
48
val map_to_set : ('a -> bool) -> 'a t -> ISet.t