mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
2 lines
No EOL
3.7 KiB
HTML
2 lines
No EOL
3.7 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>CCHashTrie (containers.CCHashTrie)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><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> » CCHashTrie</nav><h1>Module <code>CCHashTrie</code></h1><h2 id="hash-tries"><a href="#hash-tries" class="anchor"></a>Hash Tries</h2><p>Trie indexed by the hash of the keys, where the branching factor is fixed. The goal is to have a quite efficient functional structure with fast update and access <b>if</b> the hash function is good. The trie is not binary, to improve cache locality and decrease depth.</p><p>Preliminary benchmarks (see the "tbl" section of benchmarks) tend to show that this type is quite efficient for small data sets.</p><p><b>status: unstable</b></p><dl><dt>since</dt><dd>0.13</dd></dl></header><dl><dt class="spec type" id="type-sequence"><a href="#type-sequence" class="anchor"></a><code><span class="keyword">type </span>'a sequence</code><code><span class="keyword"> = </span>(<span class="type-var">'a</span> <span>-></span> unit) <span>-></span> unit</code></dt><dt class="spec type" id="type-gen"><a href="#type-gen" class="anchor"></a><code><span class="keyword">type </span>'a gen</code><code><span class="keyword"> = </span>unit <span>-></span> <span class="type-var">'a</span> option</code></dt><dt class="spec type" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span class="keyword">type </span>'a printer</code><code><span class="keyword"> = </span>Format.formatter <span>-></span> <span class="type-var">'a</span> <span>-></span> unit</code></dt><dt class="spec type" id="type-ktree"><a href="#type-ktree" class="anchor"></a><code><span class="keyword">type </span>'a ktree</code><code><span class="keyword"> = </span>unit <span>-></span> [ `Nil<span class="keyword"> | </span>`Node of <span class="type-var">'a</span><span class="keyword"> * </span><span class="type-var">'a</span> <a href="index.html#type-ktree">ktree</a> list ]</code></dt></dl><dl><dt class="spec module" id="module-Transient"><a href="#module-Transient" class="anchor"></a><code><span class="keyword">module </span><a href="Transient/index.html">Transient</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec module-type" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span class="keyword">module type </span><a href="module-type-S/index.html">S</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec module-type" id="module-type-KEY"><a href="#module-type-KEY" class="anchor"></a><code><span class="keyword">module type </span><a href="module-type-KEY/index.html">KEY</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt 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-K/index.html">K</a> : <a href="index.html#module-type-KEY">KEY</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-key">key</a><span class="keyword"> = </span><a href="Make/argument-1-K/index.html#type-t">K.t</a></code></dt><dd></dd></dl></div></body></html> |