[ https://issues.apache.org/jira/browse/COLLECTIONS-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Warren updated COLLECTIONS-855: -------------------------------------- Description: The EnhancedDoubleHasher currently computes the hash with the cube component lagging by 1: {noformat} hash[i] = ( h1(x) - i*h2(x) - ((i-1)^3 - (i-1))/6 ) wrapped in [0, bits){noformat} Correct this to the intended: {noformat} hash[i] = ( h1(x) - i*h2(x) - (i*i*i - i)/6 ) wrapped in [0, bits){noformat} This is a simple change in the current controlling loop from: {code:java} for (int i = 0; i < k; i++) { {code} to: {code:java} for (int i = 1; i <= k; i++) { {code} Issue notified by Juan Manuel Gimeno Illa on the Commons dev mailing list (see [https://lists.apache.org/thread/wjmwxzozrtf41ko9r0g7pzrrg11o923o]). Pull request: https://github.com/apache/commons-collections/pull/501 was: The EnhancedDoubleHasher currently computes the hash with the cube component lagging by 1: {noformat} hash[i] = ( h1(x) - i*h2(x) - ((i-1)^3 - (i-1))/6 ) wrapped in [0, bits){noformat} Correct this to the intended: {noformat} hash[i] = ( h1(x) - i*h2(x) - (i*i*i - i)/6 ) wrapped in [0, bits){noformat} This is a simple change in the current controlling loop from: {code:java} for (int i = 0; i < k; i++) { {code} to: {code:java} for (int i = 1; i <= k; i++) { {code} Issue notified by Juan Manuel Gimeno Illa on the Commons dev mailing list (see [https://lists.apache.org/thread/wjmwxzozrtf41ko9r0g7pzrrg11o923o]). > Update the EnhancedDoubleHasher to correct the cube component of the hash > ------------------------------------------------------------------------- > > Key: COLLECTIONS-855 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-855 > Project: Commons Collections > Issue Type: Bug > Components: Bloomfilter > Affects Versions: 4.5.0-M1 > Reporter: Alex Herbert > Assignee: Claude Warren > Priority: Blocker > > The EnhancedDoubleHasher currently computes the hash with the cube component > lagging by 1: > {noformat} > hash[i] = ( h1(x) - i*h2(x) - ((i-1)^3 - (i-1))/6 ) wrapped in [0, > bits){noformat} > Correct this to the intended: > {noformat} > hash[i] = ( h1(x) - i*h2(x) - (i*i*i - i)/6 ) wrapped in [0, bits){noformat} > This is a simple change in the current controlling loop from: > {code:java} > for (int i = 0; i < k; i++) { {code} > to: > {code:java} > for (int i = 1; i <= k; i++) { {code} > > Issue notified by Juan Manuel Gimeno Illa on the Commons dev mailing list > (see [https://lists.apache.org/thread/wjmwxzozrtf41ko9r0g7pzrrg11o923o]). > Pull request: https://github.com/apache/commons-collections/pull/501 -- This message was sent by Atlassian Jira (v8.20.10#820010)