Functor Index.Make_set


module Make_set: 
functor (I : IndexedType) -> Set with type elt = I.t
Functor building an implementation of sets over indices.
Parameters:
I : IndexedType

type elt 
Type of elements.
type t 
Type of set of elements.
val create : unit -> t
Create an empty set in constant time.
val size : t -> int
Cardinality of the set.


val is_empty : t -> bool
Is a set empty?


val mem : t -> elt -> bool
Determine whether element is a member of the set in constant time.
val add : t -> elt -> unit
add s e adds element e to the set s in (amortized) constant time.


val remove : t -> elt -> unit
remove s e removes element e from the set s in constant time.


val clear : t -> unit
Makes the set empty in (amortized) constant time.


val iter : (elt -> unit) -> t -> unit
iter c s applies c to all elements of s.
val iter_const : ('a -> elt -> unit) -> 'a -> t -> unit
iter_const c x s is Index.Set.iter (c x) s, only faster since applying closures is slow.
val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a
fold f a s applies f to an accumulated value and each element in the set s.
val fold_const : ('a -> 'b -> elt -> 'b) -> 'a -> 'b -> t -> 'b
fold_const f x a s is Index.Set.fold (f x) a s, only faster since applying closures is slow.

Hosted by the SourceForge.net Logo* web site.
*Other names and brands may be claimed as the property of others.