Class Wb-2-Relation

A class of functional binary relations represented as pairs of weight-
balanced binary trees. This is the default implementation of binary relations
in FSet. The inverse is constructed lazily, and maintained thereafter.

Part of:

package fset, class 2-relation

Direct Superclass

2-relationThe abstract class for FSet binary relations. It is a structure class.

Slot

map0
map1
sizeInitform:0; Type:fixnum.

Direct Method

arbReturns an arbitrary member or pair of a set, bag, or map. Specifically,
on a nonempty set, retu...
compareReturns one of :less, :greater, :equal, or :unequal according as x
is less than, greate...
conflictsReturns a 2-relation containing only those pairs of 2-relation whose domain value
is mapped to ...
contains?Returns true iff the set or bag contains x.
convertConverts the collection to the specified type. Some methods may
take additional keyword argument...
domainReturns the domain of the map, that is, the set of keys mapped by the map.
empty?Returns true iff the collection is empty.
greatestOn a set, returns two values: the greatest member of the set and
true; on a bag, returns three va...
internal-do-2-relation
intersectionReturns the intersection of the two sets/bags. The result is a bag
if both arguments are bags; o...
inverseThe inverse of a binary relation.
joinA relational equijoin, matching up column-a of relation-a with column-b of
relation-b. F...
leastOn a set, returns two values: the smallest member of the set and
true; on a bag, returns three va...
lessOn a set, removes value1 from it if present, returning the updated set.
On a bag, removes valu...
lookupIf collection is a map, returns the value to which key is mapped.
If collection is a seq, t...
lookup-invDoes an inverse lookup on a binary relation.
rangeReturns the range of the map, that is, the set of all values to which keys
are mapped by the map.
sizeReturns the number of members in a set, seq, or bag, or the number of
pairs in a map. The size o...
unionReturns the union of the two sets/bags. The result is a set if both
arguments are sets; otherwis...
verify
withOn a set, adds value1 to it, returning the updated set. On a bag, adds
value2 occurrences of...

Other Method

arityReturns the arity of the relation rel.
closureThe transitive closure of the set over the relation. The relation may
also be supplied as a func...