mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
2 lines
No EOL
5 KiB
HTML
2 lines
No EOL
5 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>CCHeap (containers.CCHeap)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">containers</a> » CCHeap</nav><h1>Module <code>CCHeap</code></h1><h2 id="leftist-heaps"><a href="#leftist-heaps" class="anchor"></a>Leftist Heaps</h2><p>Implementation following Okasaki's book.</p></header><dl><dt class="spec type" id="type-sequence"><a href="#type-sequence" class="anchor"></a><code><span class="keyword">type</span> <span>'a sequence</span></code><code> = <span>(<span class="type-var">'a</span> <span>-></span> unit)</span> <span>-></span> unit</code></dt><dd><dl><dt>deprecated</dt><dd><p>use <code>'a iter</code> instead</p></dd></dl></dd></dl><dl><dt class="spec type" id="type-iter"><a href="#type-iter" class="anchor"></a><code><span class="keyword">type</span> <span>'a iter</span></code><code> = <span>(<span class="type-var">'a</span> <span>-></span> unit)</span> <span>-></span> unit</code></dt><dd><p>Fast internal iterator.</p><dl><dt>since</dt><dd>2.8</dd></dl></dd></dl><dl><dt class="spec type" id="type-gen"><a href="#type-gen" class="anchor"></a><code><span class="keyword">type</span> <span>'a gen</span></code><code> = unit <span>-></span> <span><span class="type-var">'a</span> option</span></code></dt><dt class="spec type" id="type-klist"><a href="#type-klist" class="anchor"></a><code><span class="keyword">type</span> <span>'a klist</span></code><code> = unit <span>-></span> <span>[ `Nil <span><span>| `Cons</span> of <span class="type-var">'a</span> * <span><span class="type-var">'a</span> <a href="index.html#type-klist">klist</a></span></span> ]</span></code></dt><dt class="spec type" id="type-ktree"><a href="#type-ktree" class="anchor"></a><code><span class="keyword">type</span> <span>'a ktree</span></code><code> = unit <span>-></span> <span>[ `Nil <span><span>| `Node</span> of <span class="type-var">'a</span> * <span><span><span class="type-var">'a</span> <a href="index.html#type-ktree">ktree</a></span> list</span></span> ]</span></code></dt><dt class="spec type" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span class="keyword">type</span> <span>'a printer</span></code><code> = Format.formatter <span>-></span> <span class="type-var">'a</span> <span>-></span> unit</code></dt></dl><div class="spec module-type" id="module-type-PARTIAL_ORD"><a href="#module-type-PARTIAL_ORD" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-PARTIAL_ORD/index.html">PARTIAL_ORD</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module-type" id="module-type-TOTAL_ORD"><a href="#module-type-TOTAL_ORD" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-TOTAL_ORD/index.html">TOTAL_ORD</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module-type" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="spec module" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span class="keyword">module</span> <a href="Make/index.html">Make</a> : <span class="keyword">functor</span> (<a href="Make/argument-1-E/index.html">E</a> : <a href="index.html#module-type-PARTIAL_ORD">PARTIAL_ORD</a>) <span>-></span> <a href="index.html#module-type-S">S</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="Make/index.html#type-elt">elt</a> = <a href="Make/argument-1-E/index.html#type-t">E.t</a></code></div><dl><dt class="spec module" id="module-Make_from_compare"><a href="#module-Make_from_compare" class="anchor"></a><code><span class="keyword">module</span> <a href="Make_from_compare/index.html">Make_from_compare</a> : <span class="keyword">functor</span> (<a href="Make_from_compare/argument-1-E/index.html">E</a> : <a href="index.html#module-type-TOTAL_ORD">TOTAL_ORD</a>) <span>-></span> <a href="index.html#module-type-S">S</a> <span class="keyword">with</span> <span class="keyword">type</span> <a href="Make_from_compare/index.html#type-elt">elt</a> = <a href="Make_from_compare/argument-1-E/index.html#type-t">E.t</a></code></dt><dd><p>A convenient version of <code>Make</code> that take a <code>TOTAL_ORD</code> instead of a partially ordered module. It allow to directly pass modules that implement <code>compare</code> without implementing <code>leq</code> explicitly</p></dd></dl></div></body></html> |