-
Notifications
You must be signed in to change notification settings - Fork 299
Closed
Description
Hi,
BloomFilter uses GetHashCode, which yields for strings no deterministic value.
This means every test returns true.
Advanced.Algorithms.DataStructures.BloomFilter<string> bloomFilter = new Advanced.Algorithms.DataStructures.BloomFilter<string>(10);
bloomFilter.AddKey("foo");
bloomFilter.AddKey("bar");
bloomFilter.AddKey("apple");
bloomFilter.AddKey("orange");
bloomFilter.AddKey("banana");
bloomFilter.KeyExists("bar").ShouldBe(true);
bloomFilter.KeyExists("ba111r").ShouldBe(true); // is true
bloomFilter.KeyExists("banana").ShouldBe(true);
bloomFilter.KeyExists("dfs11j").ShouldBe(false);`// is also true
Metadata
Metadata
Assignees
Labels
No labels