module Set: Extlib.ExtSet.Set
Sets over ordered types.
This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.
Note OCaml, Batteries Included, provides two implementations
of sets: polymorphic sets (module PSet
) and functorized sets
(this module). Module Set
offers a more complex and slightly
poorer set of features but stronger type-safety. Module PSet
is
easier to use and has a few more powerful features but makes it
easier to shoot yourself in the foot. In case of doubt, use
Set
.
Author(s): Xavier Leroy (Base module), David Teller
module type OrderedType = Extlib.Interfaces.OrderedType
Set.Make
.
module type S =sig
..end
Set.Make
.
module Set.StringSet:Extlib.ExtSet.Set.S
with type elt = String.t
module Set.IStringSet:Extlib.ExtSet.Set.S
with type elt = String.t
module Set.NumStringSet:Extlib.ExtSet.Set.S
with type elt = String.t
module Set.RopeSet:Extlib.ExtSet.Set.S
with type elt = Rope.t
module Set.IRopeSet:Extlib.ExtSet.Set.S
with type elt = Rope.t
module Set.IntSet:Extlib.ExtSet.Set.S
with type elt = Int.t
module Set.Make:functor (
Ord
:
Extlib.ExtSet.Set.OrderedType
) ->
Extlib.ExtSet.Set.S
with type elt = Ord.t