336 lines
3.6 KiB
HTML
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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Hashtbl.Make - Functor building an implementation of the hashtable structure.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>Module</H2>
|
|
|
|
Module Hashtbl.Make
|
|
<A NAME="lbAD"> </A>
|
|
<H2>Documentation</H2>
|
|
|
|
<P>
|
|
Module
|
|
<B>Make</B>
|
|
|
|
<BR> :
|
|
<B>functor (H : HashedType) -> 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>
|
|
"H"
|
|
<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 -> 'a t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val clear </I>
|
|
|
|
:
|
|
<B>'a t -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val reset </I>
|
|
|
|
:
|
|
<B>'a t -> unit</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.00.0
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val copy </I>
|
|
|
|
:
|
|
<B>'a t -> 'a t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val add </I>
|
|
|
|
:
|
|
<B>'a t -> key -> 'a -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val remove </I>
|
|
|
|
:
|
|
<B>'a t -> key -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val find </I>
|
|
|
|
:
|
|
<B>'a t -> key -> 'a</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val find_opt </I>
|
|
|
|
:
|
|
<B>'a t -> key -> 'a option</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.05.0
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val find_all </I>
|
|
|
|
:
|
|
<B>'a t -> key -> 'a list</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val replace </I>
|
|
|
|
:
|
|
<B>'a t -> key -> 'a -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val mem </I>
|
|
|
|
:
|
|
<B>'a t -> key -> bool</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val iter </I>
|
|
|
|
:
|
|
<B>(key -> 'a -> unit) -> 'a t -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val filter_map_inplace </I>
|
|
|
|
:
|
|
<B>(key -> 'a -> 'a option) -> 'a t -> unit</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.03.0
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val fold </I>
|
|
|
|
:
|
|
<B>(key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val length </I>
|
|
|
|
:
|
|
<B>'a t -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val stats </I>
|
|
|
|
:
|
|
<B>'a t -> Hashtbl.statistics</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.00.0
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val to_seq </I>
|
|
|
|
:
|
|
<B>'a t -> (key * 'a) Seq.t</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val to_seq_keys </I>
|
|
|
|
:
|
|
<B>'a t -> key Seq.t</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val to_seq_values </I>
|
|
|
|
:
|
|
<B>'a t -> 'a Seq.t</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val add_seq </I>
|
|
|
|
:
|
|
<B>'a t -> (key * 'a) Seq.t -> unit</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val replace_seq </I>
|
|
|
|
:
|
|
<B>'a t -> (key * 'a) Seq.t -> unit</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val of_seq </I>
|
|
|
|
:
|
|
<B>(key * 'a) Seq.t -> 'a t</B>
|
|
|
|
<P>
|
|
<B>Since</B>
|
|
|
|
4.07
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </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>
|