Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 2e1eaae53aaacac75419358aca943141 > files > 85

ocaml-facile-doc-1.1-6.mga4.noarch.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 class="pre" href="Fcl_var.Fd.html" title="Fcl_var.Fd">Previous</a>
&nbsp;<a class="up" href="Fcl_var.html" title="Fcl_var">Up</a>
&nbsp;</div>
<h1>Module <a href="type_Fcl_var.SetFd.html">Fcl_var.SetFd</a></h1>

<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><div class="info module top">
Concrete integer set variable module.<br>
</div>
<hr width="100%">

<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info ">
Type of finite domain variable.<br>
</div>


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


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


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


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

<br>
<h2 id="2_Creation">Creation</h2><br>

<pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <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 id="VALinterval"><span class="keyword">val</span> interval</span> : <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 id="VALarray"><span class="keyword">val</span> array</span> : <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 id="VALelt"><span class="keyword">val</span> elt</span> : <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>
<h2 id="2_Access">Access</h2><br>

<pre><span id="VALis_var"><span class="keyword">val</span> is_var</span> : <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 id="VALis_bound"><span class="keyword">val</span> is_bound</span> : <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 id="VALvalue"><span class="keyword">val</span> value</span> : <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 id="VALmin"><span class="keyword">val</span> min</span> : <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 id="VALmax"><span class="keyword">val</span> max</span> : <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 id="VALmin_max"><span class="keyword">val</span> min_max</span> : <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 id="VALelt_value"><span class="keyword">val</span> elt_value</span> : <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 id="VALint_value"><span class="keyword">val</span> int_value</span> : <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 id="VALsize"><span class="keyword">val</span> size</span> : <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 id="VALmember"><span class="keyword">val</span> member</span> : <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 id="VALid"><span class="keyword">val</span> id</span> : <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 id="VALname"><span class="keyword">val</span> name</span> : <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 id="VALcompare"><span class="keyword">val</span> compare</span> : <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 id="VALequal"><span class="keyword">val</span> equal</span> : <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 id="VALfprint"><span class="keyword">val</span> fprint</span> : <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 id="VALfprint_array"><span class="keyword">val</span> fprint_array</span> : <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>
<h2 id="2_Refinement">Refinement</h2><br>

<pre><span id="VALunify"><span class="keyword">val</span> unify</span> : <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 id="VALrefine"><span class="keyword">val</span> refine</span> : <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 id="VALrefine_low"><span class="keyword">val</span> refine_low</span> : <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 id="VALrefine_up"><span class="keyword">val</span> refine_up</span> : <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 id="VALrefine_low_up"><span class="keyword">val</span> refine_low_up</span> : <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>
<h2 id="2_Eventsandsuspending">Events and suspending</h2><br>

<pre><span id="VALon_refine"><span class="keyword">val</span> on_refine</span> : <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 id="VALon_subst"><span class="keyword">val</span> on_subst</span> : <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 id="VALon_min"><span class="keyword">val</span> on_min</span> : <code class="type"><a href="Fcl_var.BASICFD.html#TYPEevent">event</a></code></pre>
<pre><span id="VALon_max"><span class="keyword">val</span> on_max</span> : <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 id="VALdelay"><span class="keyword">val</span> delay</span> : <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>