📄 predicate.html
字号:
<A NAME="varCount"><!-- --></A><H3>varCount</H3><PRE>private int <B>varCount</B></PRE><DL><DD>The number of variables in this predicate. Used to return a binding of the appropriate size.<P><DL></DL></DL><HR><A NAME="varIdx"><!-- --></A><H3>varIdx</H3><PRE>private int <B>varIdx</B></PRE><DL><DD>In case this predicate is a variable symbol and not a real atom, this represents its index. Otherwise, its value will be -1.<P><DL></DL></DL><HR><A NAME="staticID"><!-- --></A><H3>staticID</H3><PRE>private static int <B>staticID</B></PRE><DL><DD>A unique ID to identify this predicate. Used in conjunction with JSHOP2GUI to allow it to discern exactly which task atom is being referenced at every step of the plan finding process.<P><DL></DL></DL><HR><A NAME="ID"><!-- --></A><H3>ID</H3><PRE>private int <B>ID</B></PRE><DL><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="Predicate(int, int, JSHOP2.Term)"><!-- --></A><H3>Predicate</H3><PRE>public <B>Predicate</B>(int headIn, int varCountIn, <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A> paramIn)</PRE><DL><DD>To initialize this predicate.<P><DL><DT><B>Parameters:</B><DD><CODE>headIn</CODE> - the head of the predicate.<DD><CODE>varCountIn</CODE> - number of the variables of the predicate.<DD><CODE>paramIn</CODE> - the argument list of the predicate.</DL></DL><HR><A NAME="Predicate(int, int)"><!-- --></A><H3>Predicate</H3><PRE>public <B>Predicate</B>(int varIdxIn, int varCountIn)</PRE><DL><DD>To initialize this predicate when it is not a real predicate but a variable symbol.<P><DL><DT><B>Parameters:</B><DD><CODE>varIdxIn</CODE> - the index of the variable symbol that represents this predicate.<DD><CODE>varCountIn</CODE> - number of the variables of the predicate.</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="applySubstitution(JSHOP2.Term[])"><!-- --></A><H3>applySubstitution</H3><PRE>public <A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A> <B>applySubstitution</B>(<A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A>[] bindings)</PRE><DL><DD>To apply a binding to this predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>bindings</CODE> - the binding to be applied.<DT><B>Returns:</B><DD>the resulting predicate.</DL></DD></DL><HR><A NAME="equals(JSHOP2.Term)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A> t)</PRE><DL><DD>Whether or not the argument list of another predicate is equal to the the argument list of this predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the argument list of the other predicate.<DT><B>Returns:</B><DD><code>true</code> if the two argument lists are equal, <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="findUnifier(JSHOP2.Term)"><!-- --></A><H3>findUnifier</H3><PRE>public <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A>[] <B>findUnifier</B>(<A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A> t)</PRE><DL><DD>To find a unifier that unifies the argument list of another predicate with the argument list of this predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the argument list of the other predicate.<DT><B>Returns:</B><DD>the binding that unifies the two argument lists in case they are unifiable, <code>null</code> otherwise.</DL></DD></DL><HR><A NAME="getHead()"><!-- --></A><H3>getHead</H3><PRE>public int <B>getHead</B>()</PRE><DL><DD>To get the head of this predicate.<P><DD><DL><DT><B>Returns:</B><DD>the head of this predicate.</DL></DD></DL><HR><A NAME="getParam()"><!-- --></A><H3>getParam</H3><PRE>public <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A> <B>getParam</B>()</PRE><DL><DD>To get the parameter list of this predicate.<P><DD><DL><DT><B>Returns:</B><DD>the parameter list of this predicate.</DL></DD></DL><HR><A NAME="getVarCount()"><!-- --></A><H3>getVarCount</H3><PRE>public int <B>getVarCount</B>()</PRE><DL><DD>To get the number of variables for this predicate.<P><DD><DL><DT><B>Returns:</B><DD>the number of variables for this predicate.</DL></DD></DL><HR><A NAME="isGround()"><!-- --></A><H3>isGround</H3><PRE>public boolean <B>isGround</B>()</PRE><DL><DD>To check if this predicate is ground (i.e., has no variables).<P><DD><DL><DT><B>Returns:</B><DD><code>true</code> if this predicate is ground, <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="isVar()"><!-- --></A><H3>isVar</H3><PRE>public boolean <B>isVar</B>()</PRE><DL><DD>To check if this predicate is a variable symbol or a real predicate.<P><DD><DL><DT><B>Returns:</B><DD><code>true</code> if this predicate is a variable symbol, <code>false</code> if it is a real 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 this predicate.<P><DD><DL></DL></DD></DL><HR><A NAME="print(java.lang.String[])"><!-- --></A><H3>print</H3><PRE>public void <B>print</B>(java.lang.String[] constants)</PRE><DL><DD>This function is used to print this predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>constants</CODE> - what <code>String</code> should each constant symbol be mapped to.</DL></DD></DL><HR><A NAME="setVarCount(int)"><!-- --></A><H3>setVarCount</H3><PRE>public void <B>setVarCount</B>(int varCountIn)</PRE><DL><DD>To set the number of variables for this predicate.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>varCountIn</CODE> - the number of variables for this predicate.</DL></DD></DL><HR><A NAME="toCode()"><!-- --></A><H3>toCode</H3><PRE>public java.lang.String <B>toCode</B>()</PRE><DL><DD>This function produces Java code to create this predicate.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../JSHOP2/CompileTimeObject.html#toCode()">toCode</A></CODE> in class <CODE><A HREF="../JSHOP2/CompileTimeObject.html" title="class in JSHOP2">CompileTimeObject</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the produced code as a <code>String</code>.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>This function returns a printable <code>String</code> representation of this predicate. This function is used to print the predicates known to be logical atoms, because the indexes in this predicate representing constant symbols are mapped back by default to <code>String</code> representations of the constant symbols in logical atoms.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <code>String</code> representation of this predicate.</DL></DD></DL><HR><A NAME="toString(java.lang.String[])"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>(java.lang.String[] constants)</PRE><DL><DD>This function returns a printable <code>String</code> representation of this predicate. This function is used to print predicates other than logical atoms (such as task atoms).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>constants</CODE> - what <code>String</code> should each constant symbol be mapped to.<DT><B>Returns:</B><DD>the <code>String</code> representation of this predicate.</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public int <B>getID</B>()</PRE><DL><DD>Returns the unique identifier for this predicate<P><DD><DL><DT><B>Returns:</B><DD>an integer representing the unique ID</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/PreconditionNil.html" title="class in JSHOP2"><B>PREV CLASS</B></A> <A HREF="../JSHOP2/SolverThread.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/Predicate.html" target="_top"><B>FRAMES</B></A> <A HREF="Predicate.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 + -