|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.domains.templates.FlatCompleteLattice
Creates a flat complete lattice from a set and explicit top and bottom elements. The Hasse diagram of the resulting structure looks like this:
TOP / ... | ... \ (set elements) \ ... | ... / BOTTOM
Inner classes inherited from class de.rwth.domains.Set |
Set.Default |
Field Summary | |
protected java.lang.Object |
bottom
The top element. |
protected Set |
set
The set inside. |
protected java.lang.Object |
top
The bottom element. |
Constructor Summary | |
FlatCompleteLattice(Set set)
Creates a new FlatCompleteLattice instance from a set. |
|
FlatCompleteLattice(Set set,
java.lang.Object bottom,
java.lang.Object top)
Creates a new FlatCompleteLattice instance from a set and explicit
top and bottom elements. |
|
FlatCompleteLattice(Set set,
java.lang.String botlabel,
java.lang.String toplabel)
Creates a new FlatCompleteLattice instance from a set and names for
newly created unique top and bottom elements. |
Method Summary | |
java.lang.Object |
bottom()
Gets the least element of this CompleteLattice . |
boolean |
equals(java.lang.Object e1,
java.lang.Object e2)
Checks if two elements of this set are equal. |
boolean |
isElement(java.lang.Object e)
Elements are those which are either top, bottom or one of the elements of the set. |
java.util.Iterator |
iterator()
Returns an Iterator of the elements of this set. |
java.util.Iterator |
iteratorSkel()
Returns an Iterator of the elements of the skeleton subset this
set. |
java.lang.Object |
join(java.lang.Object o1,
java.lang.Object o2)
If the arguments are equal, then the join is, too; Otherwise, its top. |
boolean |
le(java.lang.Object e1,
java.lang.Object e2)
Bottom is less-or-equal to everything, everything is less-or-equal to top, and set elements are never less-than each other. |
boolean |
lt(java.lang.Object e1,
java.lang.Object e2)
Checks if one element is less than an other element. |
static void |
main(java.lang.String[] args)
Mini test environment. |
java.lang.Object |
meet(java.lang.Object o1,
java.lang.Object o2)
If the arguments are equal, then the meet is, too; Otherwise, its bottom. |
long |
size()
The size of the set plus 2, or -1 if the set is infinite. |
long |
sizeSkel()
The size of the set skeleton plus 2, or -1 if the set skeleton is infinite. |
java.lang.Object |
top()
Gets the greatest element of this CompleteLattice . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object bottom
protected java.lang.Object top
protected Set set
Constructor Detail |
public FlatCompleteLattice(Set set, java.lang.Object bottom, java.lang.Object top)
FlatCompleteLattice
instance from a set and explicit
top and bottom elements.set
- a Set
valuebottom
- an Object
valuetop
- an Object
valuepublic FlatCompleteLattice(Set set, java.lang.String botlabel, java.lang.String toplabel)
FlatCompleteLattice
instance from a set and names for
newly created unique top and bottom elements.set
- a Set
valuebotlabel
- a String
valuetoplabel
- a String
valuepublic FlatCompleteLattice(Set set)
FlatCompleteLattice
instance from a set. Top and
bottom elements are newly created and named "top" and "bot".set
- a Set
valueMethod Detail |
public boolean equals(java.lang.Object e1, java.lang.Object e2)
Set
equals
is reflexive,
transitive and symmetric. Furthermore, equals(e1,e2)
should
coincide with e1.equals(e2)
.equals
in interface Set
de.rwth.domains.Set
e1
- a value of type Object
e2
- a value of type Object
true
if e1
and e2
belong to this
set and are equal, false
otherwiseDomain.checkProperties(Set set)
public boolean isElement(java.lang.Object e)
isElement
in interface Set
e
- an Object
valueboolean
valuepublic java.util.Iterator iterator()
Set
Iterator
of the elements of this set.
Set.isElement(Object e)
yields true for all elements.iterator
in interface Set
de.rwth.domains.Set
Iterator
of all elements of this set.Set.isElement(Object e)
,
Domain.checkProperties(Set set)
public long size()
size
in interface Set
long
valuepublic long sizeSkel()
sizeSkel
in interface Set
long
valuepublic java.util.Iterator iteratorSkel()
Set
Iterator
of the elements of the skeleton subset this
set. It maybe null
if there is no skeleton subset.
Set.isElement(Object e)
yields true for all elements.iteratorSkel
in interface Set
de.rwth.domains.Set
Iterator
of all elements of this set.Set.isElement(Object e)
,
Domain.checkProperties(Set set)
public boolean le(java.lang.Object e1, java.lang.Object e2)
le
in interface POSet
e1
- an Object
valuee2
- an Object
valueboolean
valuepublic boolean lt(java.lang.Object e1, java.lang.Object e2)
POSet
Implementations should guarantee that lt
is reflexive, transitive
and anti-symmetric. Furthermore, lt(e1,e2)
should be the same as
.le(e1,e2)
&&!equals(e1,e2)
lt
in interface POSet
de.rwth.domains.POSet
e1
- a value of type Object
e2
- a value of type Object
true
iff both e1
and
e2
are elements
in this set and e1
is
less or equals than /e2
.Domain.checkProperties(POSet poset)
public java.lang.Object meet(java.lang.Object o1, java.lang.Object o2)
meet
in interface Lattice
o1
- an Object
valueo2
- an Object
valueObject
valuepublic java.lang.Object join(java.lang.Object o1, java.lang.Object o2)
join
in interface Lattice
o1
- an Object
valueo2
- an Object
valueObject
valuepublic java.lang.Object top()
CompleteLattice
CompleteLattice
.
Implementations should guarantee that bottom
is indeed least
element of this set, this is to say that isElement
recognises the
value returned by bottom
and lt(bottom(),e)==true
for
all elements e
.
top
in interface CompleteLattice
de.rwth.domains.CompleteLattice
Domain.checkProperties(CompleteLattice cl)
public java.lang.Object bottom()
CompleteLattice
CompleteLattice
.
Implementations should guarantee that bottom
is indeed least
element of this set, this is to say that isElement
recognises the
value returned by bottom
and lt(bottom(),e)==true
for
all elements e
.
bottom
in interface CompleteLattice
de.rwth.domains.CompleteLattice
Domain.checkProperties(CompleteLattice cl)
public static void main(java.lang.String[] args)
args
- a String[]
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |