sbrt.kernel.math.comb.comp
Class SingleElementUnionsV2
java.lang.Object
sbrt.kernel.math.comb.comp.SingleElementUnionsV2
public class SingleElementUnionsV2
- extends java.lang.Object
This class is used to compute the single-element unions of collections of
sets. A single-element union of sets will contain (at least) one element
from each set. Take, for example, the following collection of sets:
The sets of all possible single-element unions from these sets are:
{a, d, e}
| {a, d, f} |
{b, d, e}
| {b, d, f} |
{c, d, e}
| {c, d, f}. |
- Author:
- This class was written and documented by Jeremiah Wright
while in the Wagner lab.
Method Summary |
<E> java.util.Set<java.util.Set<E>> |
|
getSingletonSets(java.util.Set<E> set)
Returns a set of singleton sets created from the provided set. |
<E extends java.lang.Comparable<? super E>>
java.util.Set<java.util.Set<E>> |
|
getUnions(java.util.Collection<java.util.Set<E>> sets)
Returns the set of single-element unions of the sets in the provided
collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleElementUnionsV2
public SingleElementUnionsV2()
getSingletonSets
public <E> java.util.Set<java.util.Set<E>> getSingletonSets(java.util.Set<E> set)
- Returns a set of singleton sets created from the provided set. The
singleton sets each contain a single element from the provided set.
This can be thought of as the single-element union of the provided
set and the empty set.
- Type Parameters:
E
- the element type.- Parameters:
set
- a single set of elements.
- Returns:
- a set of singleton sets created from the provided set.
getUnions
public <E extends java.lang.Comparable<? super E>> java.util.Set<java.util.Set<E>> getUnions(java.util.Collection<java.util.Set<E>> sets)
- Returns the set of single-element unions of the sets in the provided
collection.
- Type Parameters:
E
- the element type.- Parameters:
sets
- the collection of sets.
- Returns:
- the set of single-element unions in the provided collection of
sets.