<!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="Protocol.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="Index of module types" rel=Appendix href="index_module_types.html"> <link title="Binary" rel="Chapter" href="Binary.html"> <link title="Bproto" rel="Chapter" href="Bproto.html"> <link title="Db" rel="Chapter" href="Db.html"> <link title="Graph" rel="Chapter" href="Graph.html"> <link title="Monitor_sig" rel="Chapter" href="Monitor_sig.html"> <link title="Ocamlviz" rel="Chapter" href="Ocamlviz.html"> <link title="Ocamlviz_threads" rel="Chapter" href="Ocamlviz_threads.html"> <link title="Protocol" rel="Chapter" href="Protocol.html"> <link title="Timemap" rel="Chapter" href="Timemap.html"><title>Timemap</title> </head> <body> <div class="navbar"><a href="Protocol.html">Previous</a> <a href="index.html">Up</a> </div> <center><h1>Module <a href="type_Timemap.html">Timemap</a></h1></center> <br> <pre><span class="keyword">module</span> Timemap: <code class="code">sig</code> <a href="Timemap.html">..</a> <code class="code">end</code></pre>A small module to store datas in an array and retrieve them with a logarithmic complexity.<br> <hr width="100%"> <pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type">'a</code> t </pre> <pre><span class="keyword">val</span> <a name="VALcreate"></a>create : <code class="type">?size:int -> 'a -> 'a <a href="Timemap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">create d</code> creates a timemap with the data d.<br> </div> <div class="param_info"><code class="code">size</code> : The size of the timemap at its creation</div> <pre><span class="keyword">val</span> <a name="VALadd"></a>add : <code class="type">'a <a href="Timemap.html#TYPEt">t</a> -> float -> 'a -> unit</code></pre><div class="info"> <code class="code">add tm f d</code> adds a floating-point <code class="code">f</code> and a 'a <code class="code">d</code> to the timemap <code class="code">tm</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALfind"></a>find : <code class="type">'a <a href="Timemap.html#TYPEt">t</a> -> float -> float * 'a</code></pre><div class="info"> <code class="code">find tm t</code> returns the most recent pair <code class="code">(t',v')</code> in <code class="code">tm</code> with <code class="code">t'</code> smaller or equal than <code class="code">t</code>; raises <code class="code">Not_found</code> if <code class="code">tm</code> contains no element or if the first element of <code class="code">tm</code> is younger than <code class="code">t</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALremove_before"></a>remove_before : <code class="type">'a <a href="Timemap.html#TYPEt">t</a> -> float -> unit</code></pre><div class="info"> <code class="code">remove_before tm t</code> removes all entries younger or equal to <code class="code">t</code> in <code class="code">tm</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALget_min"></a>get_min : <code class="type">unit -> float</code></pre><div class="info"> <code class="code">get_min ()</code> returns the index of the minimum 'a in the timemap.<br> </div> </body></html>