|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSHOP2.MyIterator
public class MyIterator
This class implements an iterator with data members that can keep track of where the algorithm is in terms of bindings found so far so that when the next binding is needed it can be calculated correctly. This class is needed because an atom can be satisfied either by looking for bindings at the current state of the world, or by using an axiom.
Field Summary | |
---|---|
(package private) Axiom |
ax
The axiom being used right now. |
(package private) Term[] |
binding
When an axiom is being used, this variable holds the binding that unifies the head of the axiom and the atom being proved. |
(package private) boolean |
found
Whether or not at least one satisfier has been found for the current branch of the current axiom. |
(package private) int |
index
When looking at the current state of the world, this variable represents the index of the corresponding Vector , when using an axiom
to prove an atom, this variable represents which branch of that axiom is
being used. |
(package private) Precondition |
pre
When an axiom is being used, this variable acts as an iterator over all the possible satisfiers of the precondition of the current branch of the current axiom. |
(package private) java.util.Vector<Term> |
vec
The Vector in the current state of the world that represents
the atoms for which we are trying to find satisfiers. |
(package private) int |
whichAxiom
Which of the (possibly several) axioms that can be used to prove a certain atom is being used right now. |
Constructor Summary | |
---|---|
MyIterator(java.util.Vector<Term> vecIn)
To initialize this iterator. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Axiom ax
null
.
Term[] binding
boolean found
true
,
further branches of the axiom will not be considered.
int index
Vector
, when using an axiom
to prove an atom, this variable represents which branch of that axiom is
being used.
Precondition pre
java.util.Vector<Term> vec
Vector
in the current state of the world that represents
the atoms for which we are trying to find satisfiers.
int whichAxiom
Constructor Detail |
---|
public MyIterator(java.util.Vector<Term> vecIn)
vecIn
- The Vector
in the current state of the world that
represents the atoms for which we are trying to find satisfiers.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |