You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ola Berg <ol...@ports.se> on 2002/11/19 11:48:21 UTC
[lang] Hasher
It is difficult with good hashing. But I am into giving a static utility hashing class a try, since I think it is justified in lang. I experiment with two approaches: bit mangling functions (a la Thomas Wang http://www.concentric.net/~Ttwang/tech/inthash.htm ) and lookup-tables ("buztables") like Robert Uzgalis (http://www.serve.net/buz/hash.adt/java.008.html).
The buztable that Robert provides contains 256 long values, unbiased at the bitlevel and collision free.
But I would like buztables for bytes, shorts/chars, and ints too. Do any of you know a good method for generating them?
/O
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [lang] Hasher
Posted by Ola Berg <ol...@ports.se>.
> [lang] already has a HashCodeBuilder that copes with generating fairly
> ordinary cases. Are specialised hashcodes really that useful?
> Stephen
There are a lot of useful algorithms, especially in the optimizing field, that depends on hashes with different characteristics. I regard hashing just like random numbers, a useful thing in any library. However, maybe it is not so core that it justifies itself into lang. Some math-package?
/O
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [util] Hasher?
Posted by Stephen Colebourne <sc...@btopenworld.com>.
+1 for [util]
----- Original Message -----
From: "Ola Berg" <ol...@ports.se>
Subject line says it all. Now that it seems like we are getting ourselves a
[util] package, maybe Hasher belongs there (after all, Random went into
java.util).
/O
> [lang] already has a HashCodeBuilder that copes with generating fairly
> ordinary cases. Are specialised hashcodes really that useful?
> Stephen
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
[util] Hasher?
Posted by Ola Berg <ol...@ports.se>.
Subject line says it all. Now that it seems like we are getting ourselves a [util] package, maybe Hasher belongs there (after all, Random went into java.util).
/O
> [lang] already has a HashCodeBuilder that copes with generating fairly
> ordinary cases. Are specialised hashcodes really that useful?
> Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [lang] Hasher
Posted by Stephen Colebourne <sc...@btopenworld.com>.
[lang] already has a HashCodeBuilder that copes with generating fairly
ordinary cases. Are specialised hashcodes really that useful?
Stephen
----- Original Message -----
From: "Ola Berg" <ol...@ports.se>
It is difficult with good hashing. But I am into giving a static utility
hashing class a try, since I think it is justified in lang. I experiment
with two approaches: bit mangling functions (a la Thomas Wang
http://www.concentric.net/~Ttwang/tech/inthash.htm ) and lookup-tables
("buztables") like Robert Uzgalis
(http://www.serve.net/buz/hash.adt/java.008.html).
The buztable that Robert provides contains 256 long values, unbiased at the
bitlevel and collision free.
But I would like buztables for bytes, shorts/chars, and ints too. Do any of
you know a good method for generating them?
/O
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>