This file is indexed.

/usr/share/mozart/doc/cpitut/node17.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>Accessing the Constraint Store</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="node16.html#ct.casestudy.impl.constraint">&lt;&lt; Prev</A></TD><TD><A href="node13.html">- Up -</A></TD><TD><A href="node18.html#ct.casestudy.impl.expect">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="ct.casestudy.impl.rivar"><H4><A name="ct.casestudy.impl.rivar">Accessing the Constraint Store</A></H4><P>The class <CODE>RIVar</CODE> is defined to provide access to a real-interval variable in the constraint store. The class <CODE>RIVar</CODE> is derived from <CODE>OZ_CtVar</CODE>. The private and protected part of the class definition of <CODE>RIVar</CODE> is the implementation of the principle described in <A href="../cpiref/node14.html#ct.reference.ctvar">Section&nbsp;2.5 of ``The Mozart Constraint Extensions Reference''</A> for real-interval constraints. </P><BLOCKQUOTE class="linenumbers"><PRE><SPAN class="keyword">class</SPAN>&nbsp;<SPAN class="type">RIVar</SPAN>&nbsp;:&nbsp;<SPAN class="keyword">public</SPAN>&nbsp;<SPAN class="type">OZ_CtVar</SPAN>&nbsp;{<BR><SPAN class="keyword">private</SPAN>:<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="type">RI</SPAN>&nbsp;*&nbsp;<SPAN class="variablename">_ref</SPAN>;<BR>&nbsp;&nbsp;<SPAN class="type">RI</SPAN>&nbsp;<SPAN class="variablename">_copy</SPAN>,&nbsp;<SPAN class="variablename">_encap</SPAN>;<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="type">RIProfile</SPAN>&nbsp;<SPAN class="variablename">_rip</SPAN>;<BR>&nbsp;<BR><SPAN class="keyword">protected</SPAN>:<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">void</SPAN>&nbsp;<SPAN class="functionname">ctSetValue</SPAN>(<SPAN class="type">OZ_Term</SPAN>&nbsp;<SPAN class="variablename">t</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_copy.init(t);<BR>&nbsp;&nbsp;&nbsp;&nbsp;_ref&nbsp;=&nbsp;&amp;_copy;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="functionname">ctRefConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="variablename">c</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;_ref&nbsp;=&nbsp;(<SPAN class="type">RI</SPAN>&nbsp;*)&nbsp;c;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="functionname">ctSaveConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="variablename">c</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_copy&nbsp;=&nbsp;*(<SPAN class="type">RI</SPAN>&nbsp;*)&nbsp;c;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;&amp;_copy;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="functionname">ctSaveEncapConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="variablename">c</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_encap&nbsp;=&nbsp;*(<SPAN class="type">RI</SPAN>&nbsp;*)&nbsp;c;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;&amp;_encap;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">void</SPAN>&nbsp;<SPAN class="functionname">ctRestoreConstraint</SPAN>(<SPAN class="type">void</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;*_ref&nbsp;=&nbsp;_copy;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">void</SPAN>&nbsp;<SPAN class="functionname">ctSetConstraintProfile</SPAN>(<SPAN class="type">void</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_rip&nbsp;=&nbsp;*_ref-&gt;getProfile();<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_CtProfile</SPAN>&nbsp;*&nbsp;<SPAN class="functionname">ctGetConstraintProfile</SPAN>(<SPAN class="type">void</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;&amp;_rip;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_Ct</SPAN>&nbsp;*&nbsp;<SPAN class="functionname">ctGetConstraint</SPAN>(<SPAN class="type">void</SPAN>)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;_ref;<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR><SPAN class="keyword">public</SPAN>:<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="functionname">RIVar</SPAN>(<SPAN class="type">void</SPAN>)&nbsp;:&nbsp;OZ_CtVar()&nbsp;{&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="functionname">RIVar</SPAN>(<SPAN class="type">OZ_Term</SPAN>&nbsp;<SPAN class="variablename">t</SPAN>)&nbsp;:&nbsp;OZ_CtVar()&nbsp;{&nbsp;read(t);&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">virtual</SPAN>&nbsp;<SPAN class="type">OZ_Boolean</SPAN>&nbsp;<SPAN class="functionname">isTouched</SPAN>(<SPAN class="type">void</SPAN>)&nbsp;<SPAN class="keyword">const</SPAN>&nbsp;<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;_ref-&gt;isTouched(_rip);<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="type">RI</SPAN>&nbsp;&amp;<SPAN class="keyword">operator</SPAN>&nbsp;<SPAN class="functionname">*</SPAN>&nbsp;(<SPAN class="type">void</SPAN>)&nbsp;{&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;*_ref;&nbsp;}<BR>&nbsp;&nbsp;<SPAN class="type">RI</SPAN>&nbsp;*&nbsp;<SPAN class="keyword">operator</SPAN>&nbsp;<SPAN class="functionname">-&gt;</SPAN>&nbsp;(<SPAN class="type">void</SPAN>)&nbsp;{&nbsp;<SPAN class="keyword">return</SPAN>&nbsp;_ref;&nbsp;}<BR>&nbsp;<BR>};<BR></PRE></BLOCKQUOTE><P> The public part of the class definition is self-explanatory. It provides for constructors, the function <CODE>isTouched()</CODE> to enable the C<SPAN class="allcaps">PI</SPAN> to detect if a parameter has been changed, and operators to provide direct access to the real-interval constraints. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node16.html#ct.casestudy.impl.constraint">&lt;&lt; Prev</A></TD><TD><A href="node13.html">- Up -</A></TD><TD><A href="node18.html#ct.casestudy.impl.expect">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~tmueller/">Tobias&nbsp;Müller</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>