Given a list of positive integer vectors representing sets,
return a vector of all pairwise intersections (allIntersect
),
return a vector of all pairwise unions (allUnion
),
or a vector indicating the sets that are maximal
in the sense of not being a subset of any other set in the list
(maximal
). If the list contains duplicate sets,
at most one of each class of duplicates is declared maximal.
allIntersect(sets, pow2)
allUnion(sets, pow2)
maximal(sets, pow2)
For allIntersect
or allUnion
a
list of length choose(length(sets), 2)
giving all pairwise intersections (resp. unions) of elements of sets
.
For maximal
a logical vector of the same length as sets
indicating the maximal elements.
Note: allIntersect
and allUnion
run over the pairs
in the same order so they can be matched up.
a list of vectors of storage.mode
"integer"
.
(Unlike most R functions we do not coerce real to integer.)
use hash table of size 2^pow2
. May be missing.