man-pages/man3/Hashtbl.Make.3o.html
2021-03-31 01:06:50 +01:00

336 lines
3.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Hashtbl.Make</TITLE>
</HEAD><BODY>
<H1>Hashtbl.Make</H1>
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
Hashtbl.Make - Functor building an implementation of the hashtable structure.
<A NAME="lbAC">&nbsp;</A>
<H2>Module</H2>
Module Hashtbl.Make
<A NAME="lbAD">&nbsp;</A>
<H2>Documentation</H2>
<P>
Module
<B>Make</B>
<BR>&nbsp;:&nbsp;
<B>functor (H : HashedType) -&gt; sig end</B>
<P>
<P>
Functor building an implementation of the hashtable structure.
The functor
<B>Hashtbl.Make</B>
returns a structure containing
a type
<B>key</B>
of keys and a type
<B>'a t</B>
of hash tables
associating data of type
<B>'a</B>
to keys of type
<B>key</B>
.
The operations perform similarly to those of the generic
interface, but use the hashing and equality functions
specified in the functor argument
<B>H</B>
instead of generic
equality and hashing. Since the hash function is not seeded,
the
<B>create</B>
operation of the result structure always returns
non-randomized hash tables.
<P>
<P>
<B>Parameters:</B>
<P>
&quot;H&quot;
<P>
<B>Hashtbl.HashedType</B>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<I>type key </I>
<P>
<P>
<P>
<P>
<I>type </I>
<B>'a</B>
<I>t </I>
<P>
<P>
<P>
<P>
<P>
<I>val create </I>
:
<B>int -&gt; 'a t</B>
<P>
<P>
<P>
<P>
<I>val clear </I>
:
<B>'a t -&gt; unit</B>
<P>
<P>
<P>
<P>
<I>val reset </I>
:
<B>'a t -&gt; unit</B>
<P>
<B>Since</B>
4.00.0
<P>
<P>
<P>
<I>val copy </I>
:
<B>'a t -&gt; 'a t</B>
<P>
<P>
<P>
<P>
<I>val add </I>
:
<B>'a t -&gt; key -&gt; 'a -&gt; unit</B>
<P>
<P>
<P>
<P>
<I>val remove </I>
:
<B>'a t -&gt; key -&gt; unit</B>
<P>
<P>
<P>
<P>
<I>val find </I>
:
<B>'a t -&gt; key -&gt; 'a</B>
<P>
<P>
<P>
<P>
<I>val find_opt </I>
:
<B>'a t -&gt; key -&gt; 'a option</B>
<P>
<B>Since</B>
4.05.0
<P>
<P>
<P>
<I>val find_all </I>
:
<B>'a t -&gt; key -&gt; 'a list</B>
<P>
<P>
<P>
<P>
<I>val replace </I>
:
<B>'a t -&gt; key -&gt; 'a -&gt; unit</B>
<P>
<P>
<P>
<P>
<I>val mem </I>
:
<B>'a t -&gt; key -&gt; bool</B>
<P>
<P>
<P>
<P>
<I>val iter </I>
:
<B>(key -&gt; 'a -&gt; unit) -&gt; 'a t -&gt; unit</B>
<P>
<P>
<P>
<P>
<I>val filter_map_inplace </I>
:
<B>(key -&gt; 'a -&gt; 'a option) -&gt; 'a t -&gt; unit</B>
<P>
<B>Since</B>
4.03.0
<P>
<P>
<P>
<I>val fold </I>
:
<B>(key -&gt; 'a -&gt; 'b -&gt; 'b) -&gt; 'a t -&gt; 'b -&gt; 'b</B>
<P>
<P>
<P>
<P>
<I>val length </I>
:
<B>'a t -&gt; int</B>
<P>
<P>
<P>
<P>
<I>val stats </I>
:
<B>'a t -&gt; Hashtbl.statistics</B>
<P>
<B>Since</B>
4.00.0
<P>
<P>
<P>
<I>val to_seq </I>
:
<B>'a t -&gt; (key * 'a) Seq.t</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<I>val to_seq_keys </I>
:
<B>'a t -&gt; key Seq.t</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<I>val to_seq_values </I>
:
<B>'a t -&gt; 'a Seq.t</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<I>val add_seq </I>
:
<B>'a t -&gt; (key * 'a) Seq.t -&gt; unit</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<I>val replace_seq </I>
:
<B>'a t -&gt; (key * 'a) Seq.t -&gt; unit</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<I>val of_seq </I>
:
<B>(key * 'a) Seq.t -&gt; 'a t</B>
<P>
<B>Since</B>
4.07
<P>
<P>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">Module</A><DD>
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:45 GMT, March 31, 2021
</BODY>
</HTML>