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

125 lines
1.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of MoreLabels.Hashtbl.HashedType</TITLE>
</HEAD><BODY>
<H1>MoreLabels.Hashtbl.HashedType</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>
MoreLabels.Hashtbl.HashedType - no description
<A NAME="lbAC">&nbsp;</A>
<H2>Module type</H2>
Module type MoreLabels.Hashtbl.HashedType
<A NAME="lbAD">&nbsp;</A>
<H2>Documentation</H2>
<P>
Module type
<B>HashedType</B>
<BR>&nbsp;=&nbsp;
<B>Hashtbl.HashedType</B>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<I>type t </I>
<P>
<P>
The type of the hashtable keys.
<P>
<P>
<P>
<I>val equal </I>
:
<B>t -&gt; t -&gt; bool</B>
<P>
The equality predicate used to compare keys.
<P>
<P>
<P>
<I>val hash </I>
:
<B>t -&gt; int</B>
<P>
A hashing function on keys. It must be such that if two keys are
equal according to
<B>equal</B>
, then they have identical hash values
as computed by
<B>hash</B>
.
Examples: suitable (
<B>equal</B>
,
<B>hash</B>
) pairs for arbitrary key
types include
<P>
- (
<B>(=)</B>
,
<B>Hashtbl.hash</B>
) for comparing objects by structure
(provided objects do not contain floats)
<P>
- (
<B>(fun x y -&gt; compare x y = 0)</B>
,
<B>Hashtbl.hash</B>
)
for comparing objects by structure
and handling
<B>nan</B>
correctly
<P>
- (
<B>(==)</B>
,
<B>Hashtbl.hash</B>
) for comparing objects by physical
equality (e.g. for mutable or cyclic objects).
<P>
<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 type</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:48 GMT, March 31, 2021
</BODY>
</HTML>