public class SetTools<E> extends Object
| Constructor and Description |
|---|
SetTools() |
| Modifier and Type | Method and Description |
|---|---|
Set<Set<Set<E>>> |
getBipartitions(Set<E> set)
Computes every bipartition of the given set, e.g.
|
Set<E> |
getUnion(Set<Set<E>> sets)
Returns the union of the set of sets.
|
boolean |
hasEmptyIntersection(Set<Set<E>> sets)
Checks whether the given set of sets has an empty intersection
|
Set<Set<Collection<E>>> |
independentSets(Set<Collection<E>> sets,
int cardinality)
Returns all independent sets of the given cardinality of the given set of sets.
|
Set<Set<E>> |
irreducibleHittingSets(Set<Set<E>> sets)
Computes the set of irreducible hitting sets of "sets".
|
boolean |
isIndependent(Set<Collection<E>> set)
Checks whether the given set of sets is independent, i.e.
|
Set<Set<E>> |
permutations(Set<Set<E>> partitions)
Computes all permutations of elements in partitions as follows.
|
Set<Set<E>> |
subsets(Collection<? extends E> elements)
This method computes all subsets of the given set of elements
of class "E".
|
Set<Set<E>> |
subsets(Collection<? extends E> elements,
int size)
This method computes all subsets of the given set of elements
of class "E" with the given size.
|
Set<E> |
symmetricDifference(Collection<E> s,
Collection<E> t)
Returns the symmetric difference of the two sets s and t, i.e.
|
public Set<Set<E>> subsets(Collection<? extends E> elements)
elements - a set of elements of class "E".public Set<Set<E>> subsets(Collection<? extends E> elements, int size)
elements - a set of elements of class "E".size - some int.public Set<Set<E>> permutations(Set<Set<E>> partitions)
partitions - a set of sets of E.public Set<Set<E>> irreducibleHittingSets(Set<Set<E>> sets)
sets - a set of setspublic boolean hasEmptyIntersection(Set<Set<E>> sets)
sets - some set of setspublic Set<E> getUnion(Set<Set<E>> sets)
sets - some set of setspublic Set<Set<Set<E>>> getBipartitions(Set<E> set)
set - a set of Epublic Set<E> symmetricDifference(Collection<E> s, Collection<E> t)
s - some sett - some setpublic Set<Set<Collection<E>>> independentSets(Set<Collection<E>> sets, int cardinality)
sets - a set of setspublic boolean isIndependent(Set<Collection<E>> set)
set - a set of setsCopyright © 2018. All rights reserved.