English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Hashtbl.hash and Hashtbl.hash_param
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-23 (15:27)
From: sebastien FURIC <sebastien.furic@t...>
Subject: [Caml-list] Hashtbl.hash and Hashtbl.hash_param

 What kind of algorithm is used to compute the hash code of objects in
O'Caml ?

 Hashtbl.hash (List.map (fun x -> Random.int 100)
 always returns 0 (Hashtbl.hash_param has the same properties) which is
a poor result !

 What can I do if I don't know the size of the list in advance ?


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners