mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
193 lines
No EOL
14 KiB
HTML
193 lines
No EOL
14 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 rel="next" href="CCHashSet.ELEMENT.html">
|
||
<link rel="Up" href="CCHashSet.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 : CCHashSet.S</title>
|
||
</head>
|
||
<body>
|
||
<div class="navbar"> <a class="up" href="CCHashSet.html" title="CCHashSet">Up</a>
|
||
<a class="post" href="CCHashSet.ELEMENT.html" title="CCHashSet.ELEMENT">Next</a>
|
||
</div>
|
||
<h1>Module type <a href="type_CCHashSet.S.html">CCHashSet.S</a></h1>
|
||
|
||
<pre><span class="keyword">module type</span> S = <code class="code"><span class="keyword">sig</span></code> <a href="CCHashSet.S.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><hr width="100%">
|
||
|
||
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
|
||
|
||
|
||
<pre><span id="TYPEelt"><span class="keyword">type</span> <code class="type"></code>elt</span> </pre>
|
||
|
||
|
||
<pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type">int -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
<code class="code">create n</code> makes a new set with the given capacity <code class="code">n</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALsingleton"><span class="keyword">val</span> singleton</span> : <code class="type"><a href="CCHashSet.S.html#TYPEelt">elt</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
<code class="code">singleton x</code> is the singleton <code class="code">{x}</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALclear"><span class="keyword">val</span> clear</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
|
||
<code class="code">clear s</code> removes all elements from <code class="code">s</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
Fresh copy<br>
|
||
</div>
|
||
|
||
<pre><span id="VALcopy_into"><span class="keyword">val</span> copy_into</span> : <code class="type">into:<a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
|
||
<code class="code">copy_into ~into s</code> copies all elements of <code class="code">s</code> into <code class="code">into</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALinsert"><span class="keyword">val</span> insert</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> unit</code></pre><div class="info ">
|
||
<code class="code">insert s x</code> adds <code class="code">x</code> into <code class="code">s</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> unit</code></pre><div class="info ">
|
||
Remove the element, if it were in there<br>
|
||
</div>
|
||
|
||
<pre><span id="VALcardinal"><span class="keyword">val</span> cardinal</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> int</code></pre><div class="info ">
|
||
<code class="code">cardinal s</code> returns the number of elements in <code class="code">s</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALmem"><span class="keyword">val</span> mem</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> bool</code></pre><div class="info ">
|
||
<code class="code">mem s x</code> returns <code class="code"><span class="keyword">true</span></code> iff <code class="code">x</code> is in <code class="code">s</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALfind_exn"><span class="keyword">val</span> find_exn</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a></code></pre><div class="info ">
|
||
<code class="code">find_exn s x</code> returns <code class="code">y</code> if <code class="code">x</code> and <code class="code">y</code> are equal, and <code class="code">mem s y</code>.<br>
|
||
<b>Raises</b> <code>Not_found</code> if <code class="code">x</code> not in <code class="code">s</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALfind"><span class="keyword">val</span> find</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> option</code></pre><div class="info ">
|
||
Safe version of <a href="CCHashSet.S.html#VALfind_exn"><code class="code"><span class="constructor">CCHashSet</span>.<span class="constructor">S</span>.find_exn</code></a><br>
|
||
</div>
|
||
|
||
<pre><span id="VALinter"><span class="keyword">val</span> inter</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
<code class="code">inter a b</code> returns <code class="code">a ∩ b</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALinter_mut"><span class="keyword">val</span> inter_mut</span> : <code class="type">into:<a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
|
||
<code class="code">inter_mut ~into a</code> changes <code class="code">into</code> into <code class="code">a ∩ into</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALunion"><span class="keyword">val</span> union</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
<code class="code">union a b</code> returns <code class="code">a ∪ b</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALunion_mut"><span class="keyword">val</span> union_mut</span> : <code class="type">into:<a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
|
||
<code class="code">union_mut ~into a</code> changes <code class="code">into</code> into <code class="code">a ∪ into</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALdiff"><span class="keyword">val</span> diff</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre><div class="info ">
|
||
<code class="code">diff a b</code> returns <code class="code">a - b</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALsubset"><span class="keyword">val</span> subset</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
|
||
<code class="code">subset a b</code> returns <code class="code"><span class="keyword">true</span></code> if all elements of <code class="code">a</code> are in <code class="code">b</code><br>
|
||
</div>
|
||
|
||
<pre><span id="VALequal"><span class="keyword">val</span> equal</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
|
||
<code class="code">equal a b</code> is extensional equality (<code class="code">a</code> and <code class="code">b</code> have the same elements)<br>
|
||
</div>
|
||
|
||
<pre><span id="VALfor_all"><span class="keyword">val</span> for_all</span> : <code class="type">(<a href="CCHashSet.S.html#TYPEelt">elt</a> -> bool) -> <a href="CCHashSet.S.html#TYPEt">t</a> -> bool</code></pre>
|
||
<pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type">(<a href="CCHashSet.S.html#TYPEelt">elt</a> -> bool) -> <a href="CCHashSet.S.html#TYPEt">t</a> -> bool</code></pre>
|
||
<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">(<a href="CCHashSet.S.html#TYPEelt">elt</a> -> unit) -> <a href="CCHashSet.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
|
||
Iterate on values<br>
|
||
</div>
|
||
|
||
<pre><span id="VALfold"><span class="keyword">val</span> fold</span> : <code class="type">('a -> <a href="CCHashSet.S.html#TYPEelt">elt</a> -> 'a) -> 'a -> <a href="CCHashSet.S.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
|
||
Fold on values<br>
|
||
</div>
|
||
|
||
<pre><span id="VALelements"><span class="keyword">val</span> elements</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> list</code></pre><div class="info ">
|
||
List of elements<br>
|
||
</div>
|
||
|
||
<pre><span id="VALof_list"><span class="keyword">val</span> of_list</span> : <code class="type"><a href="CCHashSet.S.html#TYPEelt">elt</a> list -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre>
|
||
<pre><span id="VALto_seq"><span class="keyword">val</span> to_seq</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> <a href="CCHashSet.html#TYPEsequence">CCHashSet.sequence</a></code></pre>
|
||
<pre><span id="VALof_seq"><span class="keyword">val</span> of_seq</span> : <code class="type"><a href="CCHashSet.S.html#TYPEelt">elt</a> <a href="CCHashSet.html#TYPEsequence">CCHashSet.sequence</a> -> <a href="CCHashSet.S.html#TYPEt">t</a></code></pre>
|
||
<pre><span id="VALadd_seq"><span class="keyword">val</span> add_seq</span> : <code class="type"><a href="CCHashSet.S.html#TYPEt">t</a> -> <a href="CCHashSet.S.html#TYPEelt">elt</a> <a href="CCHashSet.html#TYPEsequence">CCHashSet.sequence</a> -> unit</code></pre>
|
||
<pre><span id="VALpp"><span class="keyword">val</span> pp</span> : <code class="type">?sep:string -><br> <a href="CCHashSet.S.html#TYPEelt">elt</a> <a href="CCHashSet.html#TYPEprinter">CCHashSet.printer</a> -> <a href="CCHashSet.S.html#TYPEt">t</a> <a href="CCHashSet.html#TYPEprinter">CCHashSet.printer</a></code></pre><div class="info ">
|
||
<code class="code">pp pp_elt</code> returns a set printer, given a printer for
|
||
individual elements<br>
|
||
</div>
|
||
</body></html> |