129 lines
1.9 KiB
HTML
129 lines
1.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Hashtbl.HashedType</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Hashtbl.HashedType - The input signature of the functor Hashtbl.Make.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>Module type</H2>
|
|
|
|
Module type Hashtbl.HashedType
|
|
<A NAME="lbAD"> </A>
|
|
<H2>Documentation</H2>
|
|
|
|
<P>
|
|
Module type
|
|
<B>HashedType</B>
|
|
|
|
<BR> =
|
|
<B>sig end</B>
|
|
|
|
<P>
|
|
<P>
|
|
The input signature of the functor
|
|
<B>Hashtbl.Make</B>
|
|
|
|
.
|
|
<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 -> t -> bool</B>
|
|
|
|
<P>
|
|
The equality predicate used to compare keys.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val hash </I>
|
|
|
|
:
|
|
<B>t -> 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 -> 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"> </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:45 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|