116 lines
1.8 KiB
HTML
116 lines
1.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Ephemeron.Kn.Make</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Ephemeron.Kn.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>
|
|
|
|
Ephemeron.Kn.Make - Functor building an implementation of a weak hash table
|
|
<A NAME="lbAC"> </A>
|
|
<H2>Module</H2>
|
|
|
|
Module Ephemeron.Kn.Make
|
|
<A NAME="lbAD"> </A>
|
|
<H2>Documentation</H2>
|
|
|
|
<P>
|
|
Module
|
|
<B>Make</B>
|
|
|
|
<BR> :
|
|
<B>functor (H : Hashtbl.HashedType) -> sig end</B>
|
|
|
|
<P>
|
|
<P>
|
|
Functor building an implementation of a weak hash table
|
|
<P>
|
|
<P>
|
|
<B>Parameters:</B>
|
|
|
|
<P>
|
|
"H"
|
|
<P>
|
|
<B>Stdlib.Hashtbl.HashedType</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
Propose the same interface as usual hash table. However since
|
|
the bindings are weak, even if
|
|
<B>mem h k</B>
|
|
|
|
is true, a subsequent
|
|
<B>find h k</B>
|
|
|
|
may raise
|
|
<B>Not_found</B>
|
|
|
|
because the garbage collector
|
|
can run between the two.
|
|
<P>
|
|
Moreover, the table shouldn't be modified during a call to
|
|
<B>iter</B>
|
|
|
|
.
|
|
Use
|
|
<B>filter_map_inplace</B>
|
|
|
|
in this case.
|
|
<P>
|
|
|
|
<I>include Hashtbl.S</I>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val clean </I>
|
|
|
|
:
|
|
<B>'a t -> unit</B>
|
|
|
|
<P>
|
|
remove all dead bindings. Done automatically during automatic resizing.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val stats_alive </I>
|
|
|
|
:
|
|
<B>'a t -> Hashtbl.statistics</B>
|
|
|
|
<P>
|
|
same as
|
|
<B>Hashtbl.SeededS.stats</B>
|
|
|
|
but only count the alive bindings
|
|
<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:39 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|