|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CPO
An interface defining the operations on complete partial order (CPO). The definitions of these operations can be found in "Introduction to Lattices and Order," Cambridge University Press, 1990, by B. A. Davey and H. A. Priestley. Informal definitions are given in the code comments. Each element in the CPO is represented by an Object. For infinite CPOs, the result of some of the operations may be an infinite set, in which case, the class implementing those operations can throw an Exception.
Green (kienhuis) |
Green (yuhong) |
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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.lang.Object[] subset)
Compute the greatest element of a subset. |
java.lang.Object |
greatestLowerBound(java.lang.Object[] subset)
Compute the greatest lower bound (GLB) of a subset. |
java.lang.Object |
greatestLowerBound(java.lang.Object e1,
java.lang.Object e2)
Compute the greatest lower bound (GLB) of two elements. |
boolean |
isLattice()
Test if this CPO is a lattice. |
java.lang.Object |
leastElement(java.lang.Object[] subset)
Compute the least element of a subset. |
java.lang.Object |
leastUpperBound(java.lang.Object[] subset)
Compute the least upper bound (LUB) of a subset. |
java.lang.Object |
leastUpperBound(java.lang.Object e1,
java.lang.Object e2)
Compute the least upper bound (LUB) of two elements. |
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. |
Field Detail |
---|
static final int HIGHER
compare
, indicating
that the first element is higher than the second.
compare(java.lang.Object, java.lang.Object)
,
Constant Field Valuesstatic final int INCOMPARABLE
compare
, indicating
that the two elements are incomparable.
compare(java.lang.Object, java.lang.Object)
,
Constant Field Valuesstatic final int LOWER
compare
, indicating
that the first element is lower than the second.
compare(java.lang.Object, java.lang.Object)
,
Constant Field Valuesstatic final int SAME
compare
, indicating
that the two elements are the same.
compare(java.lang.Object, java.lang.Object)
,
Constant Field ValuesMethod Detail |
---|
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.lang.Object[] subset)
subset
- An array 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.java.lang.Object greatestLowerBound(java.lang.Object[] subset)
subset
- An array 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.lang.Object[] subset)
subset
- An array 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.java.lang.Object leastUpperBound(java.lang.Object[] subset)
subset
- An array 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |