Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7fd1c43f42958fba85e306866166f488 > files > 14

ocaml-bisect-devel-1.0-3.beta.1mdv2010.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="ReportHTML.html">
<link rel="next" href="ReportUtils.html">
<link rel="Up" href="index.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="Common" rel="Chapter" href="Common.html">
<link title="ReportGeneric" rel="Chapter" href="ReportGeneric.html">
<link title="ReportHTML" rel="Chapter" href="ReportHTML.html">
<link title="ReportStat" rel="Chapter" href="ReportStat.html">
<link title="ReportUtils" rel="Chapter" href="ReportUtils.html">
<link title="Runtime" rel="Chapter" href="Runtime.html"><title>Bisect : ReportStat</title>
</head>
<body>
<div class="navbar"><a href="ReportHTML.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="ReportUtils.html">Next</a>
</div>
<center><h1>Module <a href="type_ReportStat.html">ReportStat</a></h1></center>
<br>
<pre><span class="keyword">module</span> ReportStat: <code class="code">sig</code> <a href="ReportStat.html">..</a> <code class="code">end</code></pre>This module defines the types and functions related to statistics.
    All operations gracefully handle overflows by ensuring that:<ul>
<li>a value above <code class="code">max_int</code> is encoded by <code class="code">max_int</code>;</li>
<li>a value below <code class="code">min_int</code> is encoded by <code class="code">min_int</code>.</li>
</ul>
<br>
<hr width="100%">
<br><code><span class="keyword">type</span> <a name="TYPEsingle"></a><code class="type"></code>single = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>count&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Number of points actually visited.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>total&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Total number of points.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}

<div class="info">
The type of statistics for a single point kind.<br>
</div>

<pre><span class="keyword">type</span> <a name="TYPEall"></a><code class="type"></code>all = <code class="type">(<a href="Common.html#TYPEpoint_kind">Common.point_kind</a> * <a href="ReportStat.html#TYPEsingle">single</a>) list</code> </pre>
<div class="info">
The type of statistics for all point kinds, encoded as an association
    list containing all points kinds in ascending order.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALmake"></a>make : <code class="type">unit -> <a href="ReportStat.html#TYPEall">all</a></code></pre><div class="info">
Returns <i>empty</i> statistics for all point kinds.
    All element have both <code class="code">count</code> and <code class="code">total</code> set to zero.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALupdate"></a>update : <code class="type"><a href="ReportStat.html#TYPEall">all</a> -> <a href="Common.html#TYPEpoint_kind">Common.point_kind</a> -> bool -> unit</code></pre><div class="info">
<code class="code">update stats k b</code> updates <code class="code">stats</code> for point kind <code class="code">k</code>.
    <code class="code">total</code> is always incremented, while <code class="code">count</code> is incremented
    iff <code class="code">b</code> equals <code class="code">true</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsummarize"></a>summarize : <code class="type"><a href="ReportStat.html#TYPEall">all</a> -> int * int</code></pre><div class="info">
Returns a <code class="code">(count, total)</code> couple where <code class="code">count</code> and <code class="code">total</code> are
    the sums of respectively all <code class="code">count</code> and all <code class="code">total</code> fields from
    the passed statistics.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd"></a>add : <code class="type"><a href="ReportStat.html#TYPEall">all</a> -> <a href="ReportStat.html#TYPEall">all</a> -> <a href="ReportStat.html#TYPEall">all</a></code></pre><div class="info">
<code class="code">add x y</code> returns the sum of statistics <code class="code">x</code> and <code class="code">y</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsum"></a>sum : <code class="type"><a href="ReportStat.html#TYPEall">all</a> list -> <a href="ReportStat.html#TYPEall">all</a></code></pre><div class="info">
<code class="code">sum l</code> is a fold over <code class="code">l</code> elements with function <code class="code">add</code>.<br>
</div>
</body></html>