/usr/share/mozart/doc/cpiref/node4.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>1.4 The class OZ_FDIntVar</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node3.html#r_prop"><< Prev</A></TD><TD><A href="ip.html">- Up -</A></TD><TD><A href="node5.html#r_fd">Next >></A></TD></TR></TABLE><DIV id="r_fdint"><H2><A name="r_fdint">1.4 The class <CODE>OZ_FDIntVar</CODE></A></H2><P> An instance of this class is a mapping of a finite domain integer variable on the heap of the emulator to a C/C++ data structure. The provided functionality allows to directly manipulate the domain (constraint) of the heap variable.</P><P></P><DIV id="r_fdint.constr"><H3><A name="r_fdint.constr">1.4.1 Constructor Member Functions</A></H3><P> </P><DL><DT class="constructor"><CODE>OZ_FDIntVar</CODE> <A name="label58"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constructor</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FDIntVar(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This constructor creates an uninitialised instance of the class <CODE>OZ_FDIntVar</CODE>, which can be initialised later by the member functions <CODE>ask()</CODE>, <CODE>read()</CODE>, or <CODE>readEncap()</CODE>. </P></DD><DT class="constructor"><CODE>OZ_FDIntVar</CODE> <A name="label59"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constructor</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FDIntVar(<SPAN class="type">OZ_Term</SPAN> <SPAN class="variablename">v</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This constructor creates an instance of class <CODE>OZ_FDIntVar</CODE> and initialises it using <CODE>read()</CODE>. </P></DD></DL><P> </P></DIV><DIV id="r_fdint.op"><H3><A name="r_fdint.op">1.4.2 Operator Member Functions</A></H3><P> </P><DL><DT class="static"><CODE><SPAN class="keyword">new</SPAN></CODE> <A name="label60"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>(<SPAN class="type">size_t</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator allocates memory for a single instance of class <CODE>OZ_FDIntVar</CODE>. This operator must only be used inside the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE>. The allocated memory is automatically reclaimed when <CODE>propagate()</CODE> is left. </P></DD><DT class="static"><CODE><SPAN class="keyword">new</SPAN>[]</CODE> <A name="label61"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>[](size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator allocates memory for an array of instances of <CODE>OZ_FDIntVar</CODE>. This operator must only be used inside the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE>. The allocated memory is automatically reclaimed when <CODE>propagate()</CODE> is left. </P></DD><DT class="static"><CODE><SPAN class="keyword">delete</SPAN></CODE> <A name="label62"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>(<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator is a dummy since reclaiming memory happens automatically. </P></DD><DT class="static"><CODE><SPAN class="keyword">delete</SPAN>[]</CODE> <A name="label63"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>[](<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator is a dummy since reclaiming memory happens automatically. </P></DD><DT class="operator"><CODE><SPAN class="keyword">operator</SPAN> *</CODE> <A name="label64"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FiniteDomain &<SPAN class="keyword">operator</SPAN> * (<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator returns a finite domain representing the constraint of this variable. </P></DD><DT class="operator"><CODE><SPAN class="keyword">operator</SPAN> -></CODE> <A name="label65"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FiniteDomain * <SPAN class="keyword">operator</SPAN> -> (<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator returns a pointer to a finite domain representing the constraint of this variable. </P></DD></DL><P> </P></DIV><DIV id="r_fdint.member"><H3><A name="r_fdint.member">1.4.3 Member Functions</A></H3><P> </P><DL><DT class="constant"><CODE>isTouched</CODE> <A name="label66"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constant member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">isTouched</SPAN>(<SPAN class="type">void</SPAN>) <SPAN class="keyword">const</SPAN>;</CODE> </P></BLOCKQUOTE></DD><DD><P>This function returns <CODE>OZ_TRUE</CODE> if at least one element has been removed from the domain and otherwise <CODE>OZ_FALSE</CODE>. </P></DD><DT class="member"><CODE>ask</CODE> <A name="label67"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">ask</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FDIntVar</CODE> for only reading constraints from the store and it does not require a call of <CODE>leave()</CODE> or <CODE>fail()</CODE>. </P></DD><DT class="member"><CODE>read</CODE> <A name="label68"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">int</SPAN> <SPAN class="functionname">read</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FDIntVar</CODE> for constraints to be read from and to be written to the constraint store. It returns the size of the domain. Using this function requires to call either <CODE>leave()</CODE> or <CODE>fail()</CODE> when leaving the member function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE>. </P></DD><DT class="member"><CODE>readEncap</CODE> <A name="label69"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">int</SPAN> <SPAN class="functionname">readEncap</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FDIntVar</CODE> for constraints to be read from the constraint store and to perform encapsulated constraint propagation as required by reified constraint propagators. It returns the size of the domain. Using this function requires to call either <CODE>leave()</CODE> or <CODE>fail()</CODE> when leaving the member function <CODE><SPAN class="reference">OZ_Propagator</SPAN>::propagate()</CODE>. For further details see <A href="../cpitut/node8.html#u_advanced.reified">Section 1.7.3 of ``The Mozart Constraint Extensions Tutorial''</A>. </P></DD><DT class="member"><CODE>leave</CODE> <A name="label70"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">leave</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be applied to each object of type <CODE>OZ_FDIntVar</CODE> when leaving the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE> and <EM>no</EM> inconsistency was detected (except it was initialised with <CODE>ask()</CODE>). This member function returns <CODE>OZ_FALSE</CODE> if the domain denotes a singleton. Otherwise it returns <CODE>OZ_TRUE</CODE>. </P></DD><DT class="member"><CODE>fail</CODE> <A name="label71"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">fail</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be applied to each object of type <CODE>OZ_FDIntVar</CODE> when leaving the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE> and inconsistency <EM>was</EM> detected (except it was initialised with <CODE>ask()</CODE>). </P></DD><DT class="member"><CODE>dropParameter</CODE> <A name="label72"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">dropParameter</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function removes the parameter associated with <CODE>*<SPAN class="keyword">this</SPAN></CODE> from the parameter set of the current propagator. This function takes care of multiple occurrences of a single variable as parameter, i.e., a parameter is removed if there is only one occurrence of the corresponding variable in the set of parameter left. </P></DD></DL><P> </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node3.html#r_prop"><< Prev</A></TD><TD><A href="ip.html">- Up -</A></TD><TD><A href="node5.html#r_fd">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~tmueller/">Tobias Müller</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|