This module implements sets using bounded balanced binary trees. It is adapted from the Mercury version. The original is available from http://www.cs.mu.oz.au/research/mercury/. That implementation is based on `Functional Pearls: Efficient sets -a balancing act' by Stephen Adams, J. Functional Programming 3 (4): 553-561, Oct 1993.
This section lists the predicates defined by this module.
Bbbtree is initialized as an empty set.
Succeeds if Bbbtree is the empty set.
Succeeds if Bbbtree is a non-empty set.
Integer is the cardinality of the set *Bbbtree*.
Bool is the atom yes if El is an element of *Bbbtree*. Otherwise it is the atom *no*.
El is an element of *Bbbtree*. Can be used to enumerate all elements of *Bbbtree*.
El is the least element occurring in *Bbbtree*, using the standard ordering of terms.
El is the largest element occurring in *Bbbtree*, using the standard ordering of terms.
Bbbtree is a set with single element *El*.
BbbtreeA and BbbtreeB are the same sets.
BbbtreeB is the result of inserting El in *BbbtreeA*. The optional fourth argument is the atom yes if El is not an element of *BbbtreeA*; otherwise it is the atom *no*.
BbbtreeB is the result of inserting each of the elements in List to *BbbtreeA*.
BbbtreeB is the result of removing the element El from *BbbtreeA*. The predicate succeeds if El is not an element of BbbtreeA (cf. set_bbbtree__remove).
*BbbtreeB is the result of deleting each of the elements of List from *BbbtreeA*. The elements are not required to be contained in BbbtreeA (cf. set_bbbtree__remove_list).
BbbtreeB is the result of removing the element El from *BbbtreeA*. The predicate fails if El is not an element of BbbtreeA (cf. set_bbbtree__delete)
*BbbtreeB is the result of deleting each of the elements of List from *BbbtreeA*. The elements are required to be contained in BbbtreeA (cf. set_bbbtree__delete_list).
BbbtreeB is the result of removing the least element Least from *BbbtreeA*, in the standard ordering of terms.
BbbtreeB is the result of removing the largest element Largest from *BbbtreeA*, in the standard ordering of terms.
Bbbtree is a set containing precisely all elements of *List*.
Bbbtree is the set containing precisely the elements of *SortedList*.
Bbbtree is the set containing precisely the elements of *SortedList*. Len is the length of *SortedList*.
SortedList is a sorted list of the elements of the set *Bbbtree*.
BbbtreeC is the union of BbbtreeA and *BbbtreeB*.
Bbbtrees is a set of sets. BbbtreeC is the union of all of of these sets.
BbbtreeC is the intersection of BbbtreeA and *BbbtreeB*.
Bbbtrees is a set of sets. BbbtreeC is the set containing the elements which occur in each of Bbbtrees
BbbtreeC is the set BbbtreeA minus all elements of *BbbtreeB*.
BbbtreeA is a subset of *BbbtreeB*.
BbbtreeA is a superset of *BbbtreeB*.