public interface CPO<T>
| Green (kienhuis) |
| Green (yuhong) |
| Modifier and Type | Interface and Description |
|---|---|
static class |
CPO.BoundType
An enumeration type to represent the two different types of bounds
that can be calculated on a set of nodes in a CPO; either
a greatest lower bound or least upper bound.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
HIGHER
One of the return values of
compare, indicating
that the first element is higher than the second. |
static int |
INCOMPARABLE
One of the return values of
compare, indicating
that the two elements are incomparable. |
static int |
LOWER
One of the return values of
compare, indicating
that the first element is lower than the second. |
static int |
SAME
One of the return values of
compare, indicating
that the two elements are the same. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
bottom()
Return the bottom element of this CPO.
|
int |
compare(java.lang.Object e1,
java.lang.Object e2)
Compare two elements in this CPO.
|
java.lang.Object[] |
downSet(java.lang.Object e)
Compute the down-set of an element in this CPO.
|
java.lang.Object |
greatestElement(java.util.Set<T> subset)
Compute the greatest element of a subset.
|
java.lang.Object |
greatestLowerBound(java.lang.Object e1,
java.lang.Object e2)
Compute the greatest lower bound (GLB) of two elements.
|
T |
greatestLowerBound(java.util.Set<T> subset)
Compute the greatest lower bound (GLB) of a subset.
|
boolean |
isLattice()
Test if this CPO is a lattice.
|
java.lang.Object |
leastElement(java.util.Set<T> subset)
Compute the least element of a subset.
|
java.lang.Object |
leastUpperBound(java.lang.Object e1,
java.lang.Object e2)
Compute the least upper bound (LUB) of two elements.
|
T |
leastUpperBound(java.util.Set<T> subset)
Compute the least upper bound (LUB) of a subset.
|
java.lang.Object |
top()
Return the top element of this CPO.
|
java.lang.Object[] |
upSet(java.lang.Object e)
Compute the up-set of an element in this CPO.
|
static final int HIGHER
compare, indicating
that the first element is higher than the second.static final int INCOMPARABLE
compare, indicating
that the two elements are incomparable.static final int LOWER
compare, indicating
that the first element is lower than the second.static final int SAME
compare, indicating
that the two elements are the same.java.lang.Object bottom()
null if the bottom does not exist.int compare(java.lang.Object e1,
java.lang.Object e2)
e1 - An Object representing a CPO element.e2 - An Object representing a CPO element.CPO.LOWER, CPO.SAME,
CPO.HIGHER, CPO.INCOMPARABLE.java.lang.IllegalArgumentException - If at least one of the
specified Objects is not an element of this CPO.java.lang.Object[] downSet(java.lang.Object e)
e - An Object representing an element in this CPO.java.lang.IllegalArgumentException - If the specified Object is not
an element in this CPO, or the resulting set is infinite.java.lang.Object greatestElement(java.util.Set<T> subset)
subset - A set of Objects representing the subset.null if the greatest element does not exist.java.lang.IllegalArgumentException - If at least one Object in the
specified array is not an element of this CPO.java.lang.Object greatestLowerBound(java.lang.Object e1,
java.lang.Object e2)
e1 - An Object representing an element in this CPO.e2 - An Object representing an element in this CPO.null if the GLB does not exist.java.lang.IllegalArgumentException - If at least one of the
specified Objects is not an element of this CPO.T greatestLowerBound(java.util.Set<T> subset)
subset - A set of Objects representing the subset.null if the GLB does not exist.java.lang.IllegalArgumentException - If at least one Object
in the specified array is not an element of this CPO.boolean isLattice()
false otherwise.java.lang.Object leastElement(java.util.Set<T> subset)
subset - A set of Objects representing the subset.null if the least element does not exist.java.lang.IllegalArgumentException - If at least one Object in the
specified array is not an element of this CPO.java.lang.Object leastUpperBound(java.lang.Object e1,
java.lang.Object e2)
e1 - An Object representing an element in this CPO.e2 - An Object representing an element in this CPO.null if the LUB does not exist.java.lang.IllegalArgumentException - If at least one of the
specified Objects is not an element of this CPO.T leastUpperBound(java.util.Set<T> subset)
subset - A set of Objects representing the subset.null if the LUB does not exist.java.lang.IllegalArgumentException - If at least one Object
in the specified array is not an element of this CPO.java.lang.Object top()
null if the top does not exist.java.lang.Object[] upSet(java.lang.Object e)
e - An Object representing an element in this CPO.java.lang.IllegalArgumentException - If the specified Object is not
an element of this CPO, or the resulting set is infinite.