Subset {rcdd}R Documentation

subsets and maximal sets

Description

Given a list of positive integer vectors representing sets, return a vector of all pairwise intersections (all.intersect), return a vector of all pairwise unions (all.union), 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.

Usage

all.intersect(sets, pow2)
all.union(sets, pow2)
maximal(sets, pow2)

Arguments

sets a list of vectors of storage.mode "integer". (Unlike most R functions we do not coerce real to integer.)
pow2 use hash table of size 2^pow2. May be missing.

Value

For all.intersect or all.union 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: all.intersect and all.union run over the pairs in the same order so they can be matched up.


[Package rcdd version 1.1 Index]