Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-03 15:59:09 -0700 (Thu, 03 May 2007)
Revision: 10620
Log message:
Re-did the hash code a little.
- Renamed "strong" -> "fine" and "weak" -> "coarse". The latter are
clear to me, but the former are subject to interpretation. Sorry
about that.
- The coarse comparison function was wrong because it used the
fine hash.
coarse_compare item1 item2 =
if item1.fine_hash < item2.fine_hash then
-1
...
In fact, _both_ hashes must be computed, and the coarse comparison
needs to use the coarse hash.
Invariant: fine_hash1 = fine_hash2 => coarse_hash1 = coarse_hash2
Changes | Path |
+56 -170 | libmojave/util/lm_hash.ml |
+4 -3 | libmojave/util/lm_hash.mli |
+12 -18 | libmojave/util/lm_hash_sig.ml |