Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5ee7712a65135f0dd95d1c92938a0193 > files > 85

ocaml-facile-doc-1.1-2mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Fcl_var.Fd.html">
<link rel="Up" href="Fcl_var.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Fcl_genesis" rel="Chapter" href="Fcl_genesis.html">
<link title="Fcl_debug" rel="Chapter" href="Fcl_debug.html">
<link title="Fcl_misc" rel="Chapter" href="Fcl_misc.html">
<link title="Fcl_float" rel="Chapter" href="Fcl_float.html">
<link title="Fcl_stak" rel="Chapter" href="Fcl_stak.html">
<link title="Fcl_domain" rel="Chapter" href="Fcl_domain.html">
<link title="Fcl_setDomain" rel="Chapter" href="Fcl_setDomain.html">
<link title="Fcl_data" rel="Chapter" href="Fcl_data.html">
<link title="Fcl_cstr" rel="Chapter" href="Fcl_cstr.html">
<link title="Fcl_var" rel="Chapter" href="Fcl_var.html">
<link title="Fcl_reify" rel="Chapter" href="Fcl_reify.html">
<link title="Fcl_invariant" rel="Chapter" href="Fcl_invariant.html">
<link title="Fcl_boolean" rel="Chapter" href="Fcl_boolean.html">
<link title="Fcl_alldiff" rel="Chapter" href="Fcl_alldiff.html">
<link title="Fcl_linear" rel="Chapter" href="Fcl_linear.html">
<link title="Fcl_nonlinear" rel="Chapter" href="Fcl_nonlinear.html">
<link title="Fcl_expr" rel="Chapter" href="Fcl_expr.html">
<link title="Fcl_arith" rel="Chapter" href="Fcl_arith.html">
<link title="Fcl_interval" rel="Chapter" href="Fcl_interval.html">
<link title="Fcl_gcc" rel="Chapter" href="Fcl_gcc.html">
<link title="Fcl_fdArray" rel="Chapter" href="Fcl_fdArray.html">
<link title="Fcl_conjunto" rel="Chapter" href="Fcl_conjunto.html">
<link title="Fcl_sorting" rel="Chapter" href="Fcl_sorting.html">
<link title="Fcl_goals" rel="Chapter" href="Fcl_goals.html">
<link title="Fcl_opti" rel="Chapter" href="Fcl_opti.html">
<link title="Facile" rel="Chapter" href="Facile.html"><link title="Creation" rel="Section" href="#2_Creation">
<link title="Access" rel="Section" href="#2_Access">
<link title="Refinement" rel="Section" href="#2_Refinement">
<link title="Events and suspending" rel="Section" href="#2_Eventsandsuspending">
<title>Fcl_var.SetFd</title>
</head>
<body>
<div class="navbar"><a href="Fcl_var.Fd.html">Previous</a>
&nbsp;<a href="Fcl_var.html">Up</a>
&nbsp;</div>
<center><h1>Module <a href="type_Fcl_var.SetFd.html">Fcl_var.SetFd</a></h1></center>
<br>
<pre><span class="keyword">module</span> SetFd: <code class="type"><a href="Fcl_var.BASICFD.html">BASICFD</a></code><code class="type"> 
 with
     type domain = Fcl_setDomain.t
     and type elt = <a href="Fcl_setDomain.S.html">Fcl_setDomain.S</a>.t
     and type attr = SetAttr.t
     and type event = SetAttr.event</code></pre>Concrete integer set variable module.<br>
<hr width="100%">
<pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type"></code>t </pre>
<div class="info">
Type of finite domain variable.<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEattr"></a><code class="type"></code>attr </pre>
<div class="info">
Type of attributes.<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEdomain"></a><code class="type"></code>domain </pre>
<div class="info">
Type of domains.<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEelt"></a><code class="type"></code>elt </pre>
<div class="info">
Type of elements of domains.<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEevent"></a><code class="type"></code>event </pre>
<div class="info">
Type of domain reduction events.<br>
</div>

<br>
<a name="2_Creation"></a>
<h2>Creation</h2><br>
<pre><span class="keyword">val</span> <a name="VALcreate"></a>create : <code class="type">?name:string -> <a href="Fcl_var.BASICFD.html#TYPEdomain">domain</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">create ?name d</code> returns a new variable with domain <code class="code">d</code>. If provided,
    <code class="code">name</code> will be used by the pretty printer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALinterval"></a>interval : <code class="type">?name:string -><br>       <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">interval ?name inf sup</code> returns a new variable with domain <code class="code">[inf..sup]</code>.
    If provided, <code class="code">name</code> will be used by the pretty printer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALarray"></a>array : <code class="type">?name:string -><br>       int -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a> array</code></pre><div class="info">
<code class="code">array n inf sup</code> returns an array of <code class="code">n</code> new variables with domain
   <code class="code">[inf..sup]</code>. If provided, <code class="code">name</code> (suffixed with the index of the element)
   will be used by the pretty printer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALelt"></a>elt : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">int n</code> returns a new variable instantiated to integer value <code class="code">n</code>.<br>
</div>
<br>
<a name="2_Access"></a>
<h2>Access</h2><br>
<pre><span class="keyword">val</span> <a name="VALis_var"></a>is_var : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> bool</code></pre><div class="info">
<code class="code">is_var v</code> returns <code class="code">true</code> if <code class="code">v</code> is not instantiated and <code class="code">false</code>
   otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALis_bound"></a>is_bound : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> bool</code></pre><div class="info">
<code class="code">is_bound v</code> returns <code class="code">true</code> if <code class="code">v</code> is instantiated and <code class="code">false</code>
   otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALvalue"></a>value : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -><br>       (<a href="Fcl_var.BASICFD.html#TYPEattr">attr</a>, <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a>) <a href="Fcl_var.html#TYPEconcrete">Fcl_var.concrete</a></code></pre><div class="info">
<code class="code">value v</code> returns <code class="code">Val n</code> if <code class="code">v</code> is instantiated to <code class="code">n</code>, <code class="code">Unk a</code> otherwise
   where <code class="code">a</code> is the attribute of <code class="code">v</code>. Should always be used in a matching:
   <code class="code">match value v with Val n -&gt; ... | Unk a -&gt; ...</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmin"></a>min : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a></code></pre><div class="info">
<code class="code">min v</code> returns the lower bound of <code class="code">v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmax"></a>max : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a></code></pre><div class="info">
<code class="code">max v</code> returns the upper bound of <code class="code">v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmin_max"></a>min_max : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> * <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a></code></pre><div class="info">
<code class="code">min_max v</code> returns both the lower and upper bounds of <code class="code">v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALelt_value"></a>elt_value : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a></code></pre><div class="info">
<code class="code">int_value v</code> returns the value of <code class="code">v</code> if it is instantiated and raises
   a <code class="code">Failure</code> exception otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALint_value"></a>int_value : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a></code></pre><pre><span class="keyword">val</span> <a name="VALsize"></a>size : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">size v</code> returns the number of integer values in the domain of <code class="code">v</code>
   (<code class="code">1</code> if <code class="code">v</code> is instantiated).<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmember"></a>member : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> bool</code></pre><div class="info">
<code class="code">member v n</code> returns <code class="code">true</code> if <code class="code">n</code> belongs to the domain of <code class="code">v</code> and
   <code class="code">false</code> otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALid"></a>id : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">id v</code> returns a unique integer identifying the attribute associated
   with <code class="code">v</code>. Must be called only on non ground variable, raise <code class="code">Failure</code>
   otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALname"></a>name : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> string</code></pre><div class="info">
<code class="code">name v</code> returns the name of variable <code class="code">v</code> (the empty string if
   it was not provided while created). Must be called only on non ground
   variable, raise <code class="code">Failure</code> otherwise.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcompare"></a>compare : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> int</code></pre><div class="info">
Compares two variables. Values (bound variables) are smaller than
     unknowns (unbound variables). Unknowns are sorted according to
     their attribute <code class="code">id</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALequal"></a>equal : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> bool</code></pre><div class="info">
Tests if two variables are equal with respect to <code class="code">compare</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfprint"></a>fprint : <code class="type">Pervasives.out_channel -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">fprint chan v</code> prints variable <code class="code">v</code> on channel <code class="code">chan</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfprint_array"></a>fprint_array : <code class="type">Pervasives.out_channel -> <a href="Fcl_var.BASICFD.html#TYPEt">t</a> array -> unit</code></pre><div class="info">
<code class="code">fprint_array chan vs</code> prints array of variables <code class="code">vs</code> on channel <code class="code">chan</code>.<br>
</div>
<br>
<a name="2_Refinement"></a>
<h2>Refinement</h2><br>
<pre><span class="keyword">val</span> <a name="VALunify"></a>unify : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> unit</code></pre><div class="info">
<code class="code">unify v n</code> instantiates variable <code class="code">v</code> with integer value <code class="code">n</code>. Raises
   <code class="code">Fcl_stak.Fail</code> in case of failure. <code class="code">unify</code> may be called either on unbound
   variables or on instantiated variables.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALrefine"></a>refine : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEdomain">domain</a> -> unit</code></pre><div class="info">
<code class="code">refine v d</code> reduces the domain of <code class="code">v</code> with domain <code class="code">d</code>. <code class="code">d</code> must be
   included in the domain of <code class="code">v</code>, otherwise the behaviour is
   unspecified (corrupted system or exception raised).<br>
</div>
<pre><span class="keyword">val</span> <a name="VALrefine_low"></a>refine_low : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> unit</code></pre><div class="info">
<code class="code">refine_low v inf</code> reduces the domain of <code class="code">v</code> by cutting all values
    strictly less than <code class="code">inf</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALrefine_up"></a>refine_up : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> unit</code></pre><div class="info">
<code class="code">refine_up v sup</code> reduces the domain of <code class="code">v</code> by cutting all values
    strictly greater than <code class="code">sup</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALrefine_low_up"></a>refine_low_up : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> <a href="Fcl_var.BASICFD.html#TYPEelt">elt</a> -> unit</code></pre><div class="info">
<code class="code">refine_low_up v inf sup</code> reduces the domain of <code class="code">v</code> by cutting all values
    strictly less than <code class="code">inf</code> and greater than <code class="code">sup</code>. Robust even if <code class="code">v</code>
    is already bound (checks that <code class="code">inf</code> &lt;= <code class="code">v</code> &lt;= <code class="code">sup</code>, otherwise fails).<br>
</div>
<br>
<a name="2_Eventsandsuspending"></a>
<h2>Events and suspending</h2><br>
<pre><span class="keyword">val</span> <a name="VALon_refine"></a>on_refine : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a></code></pre><div class="info">
Event occuring when a variable is changed, i.e. its domain modified.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALon_subst"></a>on_subst : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a></code></pre><div class="info">
Event occuring when a variable is instantiated.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALon_min"></a>on_min : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a></code></pre><pre><span class="keyword">val</span> <a name="VALon_max"></a>on_max : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a></code></pre><div class="info">
Event occuring when the lower (resp. upper) bound of a variable decreases.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALdelay"></a>delay : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a> list -><br>       <a href="Fcl_var.BASICFD.html#TYPEt">t</a> -> ?waking_id:int -> <a href="Fcl_cstr.html#TYPEt">Fcl_cstr.t</a> -> unit</code></pre><div class="info">
<code class="code">delay event_list v ~waking_id:id c</code> suspends constraint <code class="code">c</code> on all
   the events in <code class="code">event_list</code> occurring on <code class="code">v</code>. An optional integer
   <code class="code">id</code> may be associated to the wakening: it must be unique and range
   from 0 to <code class="code">nb_wakings-1</code>, <code class="code">nb_wakings</code> being the argument of <code class="code">Cstr.create</code>
   specifying the number of calls to <code class="code">delay</code> with distinct <code class="code">waking_id</code>
   arguments. These integers are arguments to the "update" function of
   constraints and aim at discriminating waking events to fire the
   appropriate propagation rule. <code class="code">waking_id</code> default value is 0.
   This function has no effect on instantiated variables (as no event
   could occur on a ground variable).<br>
</div>
</body></html>