<!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="Reins.AVLSet.MonoSet3.html"> <link rel="next" href="Reins.AVLSet.GenSet1.html"> <link rel="Up" href="Reins.AVLSet.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="Reins" rel="Chapter" href="Reins.html"><title>Reins.AVLSet.AVL_GenSet</title> </head> <body> <div class="navbar"><a href="Reins.AVLSet.MonoSet3.html">Previous</a> <a href="Reins.AVLSet.html">Up</a> <a href="Reins.AVLSet.GenSet1.html">Next</a> </div> <center><h1>Functor <a href="type_Reins.AVLSet.AVL_GenSet.html">Reins.AVLSet.AVL_GenSet</a></h1></center> <br> <pre><span class="keyword">module</span> AVL_GenSet: <div class="sig_block"><code class="code">functor (</code><code class="code">HeightDiff</code><code class="code"> : </code><code class="code">sig</code><div class="sig_block"><pre><span id="VALv"><span class="keyword">val</span> v</span> : <code class="type">int</code></pre></div><code class="code">end</code><code class="code">) -> </code><code class="type"><a href="Reins.Sets.GenSetSigFnStd.html">Reins.Sets.GenSetSigFnStd</a></code><code class="type"> </code></div></pre>This functor is similar to the <a href="Reins.AVLSet.GenSet.html"><code class="code">Reins.AVLSet.GenSet</code></a> module above, except it allows the user to specify the maximum difference between the heights of two subtrees at a node with <code class="code">HeightDiff.v</code>. The choice of this value affects the amount of effort spent rebalancing the tree after it has been modified in exchange for the cost of locating a particular element in the tree. The modules <a href="Reins.AVLSet.GenSet1.html"><code class="code">Reins.AVLSet.GenSet1</code></a>, <a href="Reins.AVLSet.GenSet2.html"><code class="code">Reins.AVLSet.GenSet2</code></a>, and <a href="Reins.AVLSet.GenSet3.html"><code class="code">Reins.AVLSet.GenSet3</code></a> below instantiate this functor with the values 1, 2, and 3 respectively. Those modules are also defined in the same compilation unit as the implementation code, so the value of HeightDiff.v is inlined, increasing performance.<br> <table border="0" cellpadding="3" width="100%"> <tr> <td align="left" valign="top" width="1%%"><b>Parameters: </b></td> <td> <table class="paramstable"> <tr> <td align="center" valign="top" width="15%"> <code>HeightDiff</code></td> <td align="center" valign="top">:</td> <td><code class="type">sig val v : int end</code> </table> </td> </tr> </table> <hr width="100%"> <pre><span class="keyword">include</span> <a href="Reins.Sets.MonoSetSig.html">Reins.Sets.MonoSetSig</a></pre> <pre><span id="VALgen"><span class="keyword">val</span> gen</span> : <code class="type">?size:int -> Random.State.t -> t</code></pre></body></html>