maximal_sets(setlist, index =FALSE)minimal_sets(setlist, index =FALSE)remove_redundant(setlist, maximal =TRUE, index =FALSE)is_inset(x, setlist, index =FALSE)filter_maximal_vectors(setlist, index =FALSE)get_subset(x, setlist, all =FALSE)get_superset(x, setlist, all =FALSE)is_subsetof(set, set2)is.subsetof(x, set)subsetof(x, set)
Arguments
setlist: List of vectors (representing a set of subsets)
index: Logical; should indices (in setlist) be returned or a set of subsets.
maximal: Logical; see section 'Details' for a description.
x, set, set2: Vector representing a set.
all: Logical; see section 'Details' for a description.
Details
'setlist' is a list of vectors representing a set of subsets; i.e. V1,...VQ where Vk is a subset of some base set V.
'all' If true, get_superset will return index of all vectors containing the element; otherwise only the first index is returned.
is_inset: Checks if the set x is in one of the Vk's.
remove_redundant: Returns those Vk which are not contained in other subsets; i.e. gives the maximal sets. If maximal is FALSE then returns the minimal sets; i.e. Vk is returned if Vk is contained in one of the other sets Vl and there are no set Vn contained in Vk.
Notice that the comparisons are made by turning the elements into characters and then comparing these. Hence 1 is identical to "1".