Re: [Collections] Implementation of EnhancedDoubleHasher

2024-06-07 Thread Claude Warren
Pull request https://github.com/apache/commons-collections/pull/501 addresses this issue - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org

[Collections] Implementation of EnhancedDoubleHasher

2024-05-18 Thread Juan Manuel Gimeno Illa
The code in the implementation of the EnhancedDoubleHasher is based on the wikipedia article https://en.wikipedia.org/wiki/Double_hashing. The code that appears in the article is: struct key; /// Opaque /// Use other data types when needed. (Must be unsigned for guaranteed wrapping.) extern unsi

Re: [Collections] Implementation of EnhancedDoubleHasher

2024-05-18 Thread Alex Herbert
Tracking this with: https://issues.apache.org/jira/browse/COLLECTIONS-855 On Sat, 18 May 2024 at 08:26, Alex Herbert wrote: > Thanks for highlighting this. I did not use the original paper and based > the implementation on Wikipedia. > > I think the issue is that we use i in [0, k); we can corr

Re: [Collections] Implementation of EnhancedDoubleHasher

2024-05-18 Thread Alex Herbert
Thanks for highlighting this. I did not use the original paper and based the implementation on Wikipedia. I think the issue is that we use i in [0, k); we can correct this by using i in [1, k]. The order inside the loop would not change but we would have to decrement i to use in the assignment giv

[Collections] Implementation of EnhancedDoubleHasher

2024-05-17 Thread Juan Manuel Gimeno Illa
The code in the implementation of the EnhancedDoubleHasher is based on the wikipedia article https://en.wikipedia.org/wiki/Double_hashing. The code that appears in the article is: struct key; /// Opaque /// Use other data types when needed. (Must be unsigned for guaranteed wrapping.) extern unsi