Share

JaSpell

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

bloom filter implementation

You are viewing a single message from this topic. View all messages.

  1. 2007-04-24 20:13:46 UTC
    I was looking for bloom filter code and stumbled upon your project. I noticed that your code doesn't work quite right -- you use hashCode() on an integer object to repeatedly generate new indices to set as 1 in the getHash(int, int) function. At least in the version of Java I'm using, if you call hashCode() on an integer, it just returns that integer, so all of your different hash functions end up giving you the same index. As a quick fix I changed it to change the produced hashes into strings and call hashCode() on each string. That will give you a series of unique hashes.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.