📄 state.html
字号:
<HR><A NAME="axioms"><!-- --></A><H3>axioms</H3><PRE>private <A HREF="../JSHOP2/Axiom.html" title="class in JSHOP2">Axiom</A>[][] <B>axioms</B></PRE><DL><DD>The axioms in the domain description as a two-dimensional array. The array is indexed first by the head of the predicates each axiom can prove and second by the axioms themselves.<P><DL></DL></DL><HR><A NAME="protections"><!-- --></A><H3>protections</H3><PRE>private java.util.Vector<<A HREF="../JSHOP2/NumberedPredicate.html" title="class in JSHOP2">NumberedPredicate</A>>[] <B>protections</B></PRE><DL><DD>The protections in the current state of the world as an array of <code>Vector</code>s. The array is indexed by the heads of protected predicates.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="State(int, JSHOP2.Axiom[][])"><!-- --></A><H3>State</H3><PRE>public <B>State</B>(int size, <A HREF="../JSHOP2/Axiom.html" title="class in JSHOP2">Axiom</A>[][] axiomsIn)</PRE><DL><DD>To initialize the state of the world.<P><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - the number of possible heads of predicates (i.e., the number of constant symbols that can come first in a predicate).<DD><CODE>axiomsIn</CODE> - the axioms in the domain description as a two-dimensional array. The array is indexed first by the head of the predicates each axiom can prove and second by the axioms themselves.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="add(JSHOP2.Predicate)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p)</PRE><DL><DD>To add a predicate to the current state of the world.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be added.<DT><B>Returns:</B><DD><code>true</code> if the predicate was added (i.e., it was not already in the current state of the world), <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="addProtection(JSHOP2.Predicate)"><!-- --></A><H3>addProtection</H3><PRE>public boolean <B>addProtection</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p)</PRE><DL><DD>To protect a given predicate in the current state of the world.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be protected.<DT><B>Returns:</B><DD>this function always returns <code>true</code>.</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>To empty the world state.<P><DD><DL></DL></DD></DL><HR><A NAME="del(JSHOP2.Predicate)"><!-- --></A><H3>del</H3><PRE>public int <B>del</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p)</PRE><DL><DD>To delete a predicate from the current state of the world.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be deleted.<DT><B>Returns:</B><DD>the index of the predicate that was deleted in the <code>Vector</code> if the predicate was deleted (i.e., it existed in the current state of the world), -1 otherwise. This index is used in case of a backtrack to undo this deletion by inserting the deleted predicate right back where it used to be.</DL></DD></DL><HR><A NAME="delProtection(JSHOP2.Predicate)"><!-- --></A><H3>delProtection</H3><PRE>public boolean <B>delProtection</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p)</PRE><DL><DD>To unprotect a given predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be unprotected.<DT><B>Returns:</B><DD><code>true</code> if the protected is unprotected successfully, <code>false</code> otherwise (i.e., when the predicate was not protected before).</DL></DD></DL><HR><A NAME="isProtected(JSHOP2.Predicate)"><!-- --></A><H3>isProtected</H3><PRE>public boolean <B>isProtected</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p)</PRE><DL><DD>To check if a predicate is protected.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be checked.<DT><B>Returns:</B><DD><code>true</code> if the predicate is protected, <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="iterator(int)"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="../JSHOP2/MyIterator.html" title="class in JSHOP2">MyIterator</A> <B>iterator</B>(int head)</PRE><DL><DD>To initialize and return the appropriate iterator when looking for ways to satisfy a given predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>head</CODE> - the index of the constant symbol that is the head of the predicate (i.e., that comes first in the predicate).<DT><B>Returns:</B><DD>the iterator to be used to find the satisfiers for this predicate.</DL></DD></DL><HR><A NAME="nextBinding(JSHOP2.Predicate, JSHOP2.MyIterator)"><!-- --></A><H3>nextBinding</H3><PRE>public <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A>[] <B>nextBinding</B>(<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> p, <A HREF="../JSHOP2/MyIterator.html" title="class in JSHOP2">MyIterator</A> me)</PRE><DL><DD>This function returns the bindings that can satisfy a given precondition one-by-one.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the predicate to be satisfied.<DD><CODE>me</CODE> - the iterator that keeps track of where we are with the satisfiers so that the next time this function is called, we can take off where we stopped last time.<DT><B>Returns:</B><DD>the next binding as an array of terms indexed by the indeices of the variable symbols in the given predicate.</DL></DD></DL><HR><A NAME="print()"><!-- --></A><H3>print</H3><PRE>public void <B>print</B>()</PRE><DL><DD>This function is used to print the current state of the world.<P><DD><DL></DL></DD></DL><HR><A NAME="getState()"><!-- --></A><H3>getState</H3><PRE>public java.util.ArrayList<java.lang.String> <B>getState</B>()</PRE><DL><DD>Returns an ArrayList of strings that represents the state. Used in conjunction with JSHOP2GUI (Added 5/28/06)<P><DD><DL><DT><B>Returns:</B><DD>- An ArrayList<String> representing the state</DL></DD></DL><HR><A NAME="undo(java.util.Vector[])"><!-- --></A><H3>undo</H3><PRE>public void <B>undo</B>(java.util.Vector[] delAdd)</PRE><DL><DD>This function is used, in case of a backtrack, to undo the changes that were made to the current state of the world because of the backtracked decision.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>delAdd</CODE> - a 4-member array of type <code>Vector</code>. These four members are the deleted atoms, the added atoms, the deleted protections and the added protections respectively.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../JSHOP2/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../JSHOP2/SolverThread.html" title="class in JSHOP2"><B>PREV CLASS</B></A> <A HREF="../JSHOP2/StdLib.html" title="class in JSHOP2"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html?JSHOP2/State.html" target="_top"><B>FRAMES</B></A> <A HREF="State.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -