mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
507 lines
No EOL
16 KiB
HTML
507 lines
No EOL
16 KiB
HTML
<!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=utf-8" http-equiv="Content-Type">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="Start" 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 class methods" rel=Appendix href="index_methods.html">
|
|
<link title="Index of class types" rel=Appendix href="index_class_types.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="CCVector" rel="Chapter" href="CCVector.html">
|
|
<link title="CCHeap" rel="Chapter" href="CCHeap.html">
|
|
<link title="CCList" rel="Chapter" href="CCList.html">
|
|
<link title="CCOpt" rel="Chapter" href="CCOpt.html">
|
|
<link title="CCPair" rel="Chapter" href="CCPair.html">
|
|
<link title="CCFun" rel="Chapter" href="CCFun.html">
|
|
<link title="CCHash" rel="Chapter" href="CCHash.html">
|
|
<link title="CCInt" rel="Chapter" href="CCInt.html">
|
|
<link title="CCBool" rel="Chapter" href="CCBool.html">
|
|
<link title="CCFloat" rel="Chapter" href="CCFloat.html">
|
|
<link title="CCArray" rel="Chapter" href="CCArray.html">
|
|
<link title="CCRef" rel="Chapter" href="CCRef.html">
|
|
<link title="CCSet" rel="Chapter" href="CCSet.html">
|
|
<link title="CCOrd" rel="Chapter" href="CCOrd.html">
|
|
<link title="CCRandom" rel="Chapter" href="CCRandom.html">
|
|
<link title="CCString" rel="Chapter" href="CCString.html">
|
|
<link title="CCHashtbl" rel="Chapter" href="CCHashtbl.html">
|
|
<link title="CCMap" rel="Chapter" href="CCMap.html">
|
|
<link title="CCFormat" rel="Chapter" href="CCFormat.html">
|
|
<link title="CCIO" rel="Chapter" href="CCIO.html">
|
|
<link title="CCInt64" rel="Chapter" href="CCInt64.html">
|
|
<link title="CCChar" rel="Chapter" href="CCChar.html">
|
|
<link title="CCResult" rel="Chapter" href="CCResult.html">
|
|
<link title="CCParse" rel="Chapter" href="CCParse.html">
|
|
<link title="CCArray_slice" rel="Chapter" href="CCArray_slice.html">
|
|
<link title="CCListLabels" rel="Chapter" href="CCListLabels.html">
|
|
<link title="CCArrayLabels" rel="Chapter" href="CCArrayLabels.html">
|
|
<link title="CCEqual" rel="Chapter" href="CCEqual.html">
|
|
<link title="Containers" rel="Chapter" href="Containers.html">
|
|
<link title="CCKTree" rel="Chapter" href="CCKTree.html">
|
|
<link title="CCKList" rel="Chapter" href="CCKList.html">
|
|
<link title="CCLazy_list" rel="Chapter" href="CCLazy_list.html">
|
|
<link title="CCMultiMap" rel="Chapter" href="CCMultiMap.html">
|
|
<link title="CCMultiSet" rel="Chapter" href="CCMultiSet.html">
|
|
<link title="CCTrie" rel="Chapter" href="CCTrie.html">
|
|
<link title="CCFlatHashtbl" rel="Chapter" href="CCFlatHashtbl.html">
|
|
<link title="CCCache" rel="Chapter" href="CCCache.html">
|
|
<link title="CCPersistentHashtbl" rel="Chapter" href="CCPersistentHashtbl.html">
|
|
<link title="CCDeque" rel="Chapter" href="CCDeque.html">
|
|
<link title="CCFQueue" rel="Chapter" href="CCFQueue.html">
|
|
<link title="CCBV" rel="Chapter" href="CCBV.html">
|
|
<link title="CCMixtbl" rel="Chapter" href="CCMixtbl.html">
|
|
<link title="CCMixmap" rel="Chapter" href="CCMixmap.html">
|
|
<link title="CCRingBuffer" rel="Chapter" href="CCRingBuffer.html">
|
|
<link title="CCIntMap" rel="Chapter" href="CCIntMap.html">
|
|
<link title="CCPersistentArray" rel="Chapter" href="CCPersistentArray.html">
|
|
<link title="CCMixset" rel="Chapter" href="CCMixset.html">
|
|
<link title="CCGraph" rel="Chapter" href="CCGraph.html">
|
|
<link title="CCHashSet" rel="Chapter" href="CCHashSet.html">
|
|
<link title="CCBitField" rel="Chapter" href="CCBitField.html">
|
|
<link title="CCHashTrie" rel="Chapter" href="CCHashTrie.html">
|
|
<link title="CCWBTree" rel="Chapter" href="CCWBTree.html">
|
|
<link title="CCRAL" rel="Chapter" href="CCRAL.html">
|
|
<link title="CCSimple_queue" rel="Chapter" href="CCSimple_queue.html">
|
|
<link title="CCImmutArray" rel="Chapter" href="CCImmutArray.html">
|
|
<link title="CCHet" rel="Chapter" href="CCHet.html">
|
|
<link title="CCZipper" rel="Chapter" href="CCZipper.html">
|
|
<link title="CCPool" rel="Chapter" href="CCPool.html">
|
|
<link title="CCLock" rel="Chapter" href="CCLock.html">
|
|
<link title="CCSemaphore" rel="Chapter" href="CCSemaphore.html">
|
|
<link title="CCThread" rel="Chapter" href="CCThread.html">
|
|
<link title="CCBlockingQueue" rel="Chapter" href="CCBlockingQueue.html">
|
|
<link title="CCTimer" rel="Chapter" href="CCTimer.html">
|
|
<link title="CCUnix" rel="Chapter" href="CCUnix.html">
|
|
<link title="CCSexp" rel="Chapter" href="CCSexp.html">
|
|
<link title="CCSexp_lex" rel="Chapter" href="CCSexp_lex.html"><title>Containers doc</title>
|
|
</head>
|
|
<body>
|
|
<h1>Containers doc</h1>
|
|
<h1 id="1_Containers">Containers</h1>
|
|
<p>
|
|
|
|
<h2 id="2_ChangeLog">Change Log</h2>
|
|
<p>
|
|
|
|
See <a href=" https://github.com/c-cube/ocaml-containers/blob/master/CHANGELOG.adoc "> this file</a>
|
|
<p>
|
|
|
|
<h2 id="2_License">License</h2>
|
|
<p>
|
|
|
|
This code is free, under the BSD license.
|
|
<p>
|
|
|
|
The logo (media/logo.png) is
|
|
CC-SA3 <a href="http://en.wikipedia.org/wiki/File:Hypercube.svg"> wikimedia</a>
|
|
<p>
|
|
|
|
<h2 id="2_Contents">Contents</h2>
|
|
<p>
|
|
|
|
The design is mostly centered around polymorphism rather than functors. Such
|
|
structures comprise (some modules in misc/, some other in core/):
|
|
<p>
|
|
|
|
the core library, containers, now depends on
|
|
<a href="https://github.com/mjambon/cppo">cppo</a> and base-bytes (provided
|
|
by ocamlfind).
|
|
<p>
|
|
|
|
<h4 id="4_CoreModulesextensionofthestandardlibrary">Core Modules (extension of the standard library)</h4>
|
|
<p>
|
|
|
|
<b>findlib name</b>: containers
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCArray.html">CCArray</a></td><td><div class="info">
|
|
Array utils
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCArrayLabels.html">CCArrayLabels</a></td><td><div class="info">
|
|
Array utils
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCArray_slice.html">CCArray_slice</a></td><td><div class="info">
|
|
Array Slice
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCBool.html">CCBool</a></td><td><div class="info">
|
|
Basic Bool functions
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCChar.html">CCChar</a></td><td><div class="info">
|
|
Utils around char
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCEqual.html">CCEqual</a></td><td><div class="info">
|
|
Equality Combinators
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCFloat.html">CCFloat</a></td><td><div class="info">
|
|
Basic Float functions
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCFormat.html">CCFormat</a></td><td><div class="info">
|
|
Helpers for Format
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCFun.html">CCFun</a></td><td><div class="info">
|
|
Basic Functions
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCHash.html">CCHash</a></td><td><div class="info">
|
|
Hash combinators
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCHashtbl.html">CCHashtbl</a></td><td><div class="info">
|
|
Extension to the standard Hashtbl
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCHeap.html">CCHeap</a></td><td><div class="info">
|
|
Leftist Heaps following Okasaki
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCIO.html">CCIO</a></td><td><div class="info">
|
|
IO Utils
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCInt.html">CCInt</a></td><td><div class="info">
|
|
Basic Int functions
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCInt64.html">CCInt64</a></td><td><div class="info">
|
|
Int64
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCList.html">CCList</a></td><td><div class="info">
|
|
complements to list
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCListLabels.html">CCListLabels</a></td><td><div class="info">
|
|
complements to list
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMap.html">CCMap</a></td><td><div class="info">
|
|
Extensions of Standard Map
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCOpt.html">CCOpt</a></td><td><div class="info">
|
|
Options
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCOrd.html">CCOrd</a></td><td><div class="info">
|
|
Comparisons
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCPair.html">CCPair</a></td><td><div class="info">
|
|
Tuple Functions
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCParse.html">CCParse</a></td><td><div class="info">
|
|
Very Simple Parser Combinators
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCRandom.html">CCRandom</a></td><td><div class="info">
|
|
Random Generators
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCRef.html">CCRef</a></td><td><div class="info">
|
|
References
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCResult.html">CCResult</a></td><td><div class="info">
|
|
Error Monad
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCSet.html">CCSet</a></td><td><div class="info">
|
|
Wrapper around Set
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCString.html">CCString</a></td><td><div class="info">
|
|
Basic String Utils
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCVector.html">CCVector</a></td><td><div class="info">
|
|
Growable, mutable vector
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="Containers.html">Containers</a></td><td><div class="info">
|
|
Drop-In replacement to Stdlib
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
The module <a href="Containers.html"><code class="code"><span class="constructor">Containers</span></code></a> contains aliases to most other modules defined
|
|
in <i>containers core</i>, and mixins
|
|
such as:
|
|
<p>
|
|
|
|
<pre class="codepre"><code class="code"> <span class="keyword">module</span> <span class="constructor">List</span> = <span class="keyword">struct</span>
|
|
<span class="keyword">include</span> <span class="constructor">List</span>
|
|
<span class="keyword">include</span> <span class="constructor">CCList</span>
|
|
<span class="keyword">end</span>
|
|
</code></pre>
|
|
<p>
|
|
|
|
<h4 id="4_Containersdata">Containers.data</h4>
|
|
<p>
|
|
|
|
<b>findlib name</b>: containers.data
|
|
<p>
|
|
|
|
Various data structures.
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCBitField.html">CCBitField</a></td><td><div class="info">
|
|
Bit Field
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCBV.html">CCBV</a></td><td><div class="info">
|
|
Imperative Bitvectors
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCCache.html">CCCache</a></td><td><div class="info">
|
|
Caches
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCDeque.html">CCDeque</a></td><td><div class="info">
|
|
Imperative deque
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCFQueue.html">CCFQueue</a></td><td><div class="info">
|
|
Functional queues
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCFlatHashtbl.html">CCFlatHashtbl</a></td><td><div class="info">
|
|
Open-Addressing Hash-table
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCGraph.html">CCGraph</a></td><td><div class="info">
|
|
Simple Graph Interface
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCHashSet.html">CCHashSet</a></td><td><div class="info">
|
|
Mutable Set
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCHashTrie.html">CCHashTrie</a></td><td><div class="info">
|
|
Hash Tries
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCImmutArray.html">CCImmutArray</a></td><td><div class="info">
|
|
Immutable Arrays
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCIntMap.html">CCIntMap</a></td><td><div class="info">
|
|
Map specialized for Int keys
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMixmap.html">CCMixmap</a></td><td><div class="info">
|
|
Maps with Heterogeneous Values
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMixset.html">CCMixset</a></td><td><div class="info">
|
|
Set of Heterogeneous Values
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMixtbl.html">CCMixtbl</a></td><td><div class="info">
|
|
Hash Table with Heterogeneous Keys
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMultiMap.html">CCMultiMap</a></td><td><div class="info">
|
|
Multimap
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCMultiSet.html">CCMultiSet</a></td><td><div class="info">
|
|
Multiset
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCPersistentArray.html">CCPersistentArray</a></td><td><div class="info">
|
|
Persistent Arrays
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCPersistentHashtbl.html">CCPersistentHashtbl</a></td><td><div class="info">
|
|
Persistent hash-table on top of OCaml's hashtables
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCRAL.html">CCRAL</a></td><td><div class="info">
|
|
Random-Access Lists
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCRingBuffer.html">CCRingBuffer</a></td><td><div class="info">
|
|
Circular Buffer (Deque)
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCSimple_queue.html">CCSimple_queue</a></td><td><div class="info">
|
|
Functional queues (fifo)
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCTrie.html">CCTrie</a></td><td><div class="info">
|
|
Prefix Tree
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCWBTree.html">CCWBTree</a></td><td><div class="info">
|
|
Weight-Balanced Tree
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<h4 id="4_Containersunix">Containers.unix</h4>
|
|
<p>
|
|
|
|
Helpers that depend on <code class="code"><span class="constructor">Unix</span></code>, e.g. to spawn sub-processes.
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCUnix.html">CCUnix</a></td><td><div class="info">
|
|
High-level Functions on top of Unix
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<h4 id="4_Containerssexp">Containers.sexp</h4>
|
|
<p>
|
|
|
|
A small S-expression library. The interface is relatively unstable, but
|
|
the main type (<code class="code"><span class="constructor">CCSexp</span>.t</code>) isn't.
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCSexp.html">CCSexp</a></td><td><div class="info">
|
|
Handling S-expressions
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<h4 id="4_Containersiter">Containers.iter</h4>
|
|
<p>
|
|
|
|
Iterators:
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCKList.html">CCKList</a></td><td><div class="info">
|
|
Continuation List
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCKTree.html">CCKTree</a></td><td><div class="info">
|
|
Lazy Tree Structure
|
|
This structure can be used to represent trees and directed
|
|
graphs (as infinite trees) in a lazy fashion.
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCLazy_list.html">CCLazy_list</a></td><td><div class="info">
|
|
Lazy List
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<h4 id="4_String">String</h4>
|
|
<p>
|
|
|
|
containers.string has been removed. Some of its functionality is present
|
|
in <a href="CCString.html"><code class="code"><span class="constructor">CCString</span></code></a>; some in other libraries such as <code class="code"><span class="constructor">Spelll</span></code>.
|
|
<p>
|
|
|
|
<h4 id="4_Bigarrays">Bigarrays</h4>
|
|
<p>
|
|
|
|
containers.bigarray has been removed. Use the <code class="code"><span class="constructor">Bigstring</span></code> library for
|
|
arrays of bytes.
|
|
<p>
|
|
|
|
<h4 id="4_Advanced">Advanced</h4>
|
|
<p>
|
|
|
|
containers.advanced has been removed. Use <code class="code"><span class="constructor">OLinq</span></code> to replace some of its
|
|
functionality.
|
|
<p>
|
|
|
|
<h4 id="4_Misc">Misc</h4>
|
|
<p>
|
|
|
|
Moved to its own repository.
|
|
<p>
|
|
|
|
<h4 id="4_Lwt">Lwt</h4>
|
|
<p>
|
|
|
|
Moved to its own repository
|
|
<p>
|
|
|
|
<h4 id="4_ThreadHelpers">Thread Helpers</h4>
|
|
<p>
|
|
|
|
<b>findlib name</b>: containers.thread
|
|
<p>
|
|
|
|
Modules related to the use of <code class="code"><span class="constructor">Thread</span></code>.
|
|
<p>
|
|
|
|
<br>
|
|
<table class="indextable">
|
|
<tr><td class="module"><a href="CCBlockingQueue.html">CCBlockingQueue</a></td><td><div class="info">
|
|
Blocking Queue
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCLock.html">CCLock</a></td><td><div class="info">
|
|
Utils around Mutex
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCPool.html">CCPool</a></td><td><div class="info">
|
|
Thread Pool, and Futures
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCSemaphore.html">CCSemaphore</a></td><td><div class="info">
|
|
Semaphores
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCThread.html">CCThread</a></td><td><div class="info">
|
|
Threads
|
|
</div>
|
|
</td></tr>
|
|
<tr><td class="module"><a href="CCTimer.html">CCTimer</a></td><td><div class="info">
|
|
Event timer
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<h2 id="2_Index">Index</h2>
|
|
<p>
|
|
|
|
<ul class="indexlist">
|
|
<li><a href="index_types.html">Index of types</a></li>
|
|
<li><a href="index_exceptions.html">Index of exceptions</a></li>
|
|
<li><a href="index_values.html">Index of values</a></li>
|
|
<li><a href="index_methods.html">Index of class methods</a></li>
|
|
<li><a href="index_class_types.html">Index of class types</a></li>
|
|
<li><a href="index_modules.html">Index of modules</a></li>
|
|
<li><a href="index_module_types.html">Index of module types</a></li>
|
|
</ul>
|
|
<br>
|
|
</body>
|
|
</html> |