module BatSet:Sets over ordered types.sig..end
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.
This module is built upon Stdlib's
Set
module, but provides the complete interface.
Author(s): Xavier Leroy (Base module), David Teller
module type OrderedType = BatInterfaces.OrderedTypeSet.Make.
module type S =sig..end
Set.Make.
module StringSet:Swith type elt = String.t
module IStringSet:Swith type elt = String.t
module NumStringSet:Swith type elt = String.t
module RopeSet:Swith type elt = BatRope.t
module IRopeSet:Swith type elt = BatRope.t
module IntSet:Swith type elt = BatInt.t
module Make: