|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object endrov.util.collection.Partitioning<E>
public class Partitioning<E>
Partitioning, or equivalence relation between elements. The class will help computing the total equivalence (compute transitivity) given a few equivalences. Worst-case complexity: Upper bound, O(n) group joins, O(n) for one group join. Lookup is O(1). For structured partitioning on images, likely O(n) group joins, but most joins cost only O(1), so linear cost. There is an alternative implementation with O(1) join and O(log n) lookup. It can be optimized (constant time) with path compression.
Constructor Summary | |
---|---|
Partitioning()
|
Method Summary | |
---|---|
void |
createElement(E e)
Create an element with no initial relations except reflexivity. |
void |
createSpecifyEquivalent(E a,
E b)
Specify two elements as equivalent. |
void |
existingSpecifyEquivalent(E a,
E b)
Specify two existing elements as equivalent. |
java.util.List<java.util.Set<E>> |
filterSize(java.util.List<java.util.Set<E>> list,
int minSize)
Remove all entries smaller than a certain volume |
java.util.Set<E> |
getPartition(E e)
Get equivalent elements for one element |
java.util.List<java.util.Set<E>> |
getPartitions()
Get all partitions |
boolean |
isEquivalent(E a,
E b)
Check if two elements are equivalent |
void |
specifyEquivalent(E a,
E b)
Specify two elements as equivalent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Partitioning()
Method Detail |
---|
public void createElement(E e)
public void specifyEquivalent(E a, E b)
public void createSpecifyEquivalent(E a, E b)
public void existingSpecifyEquivalent(E a, E b)
public boolean isEquivalent(E a, E b)
public java.util.Set<E> getPartition(E e)
public java.util.List<java.util.Set<E>> getPartitions()
public java.util.List<java.util.Set<E>> filterSize(java.util.List<java.util.Set<E>> list, int minSize)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |