Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

maybe there is an error in RegisterSet.java #142

Open
improvejin opened this issue Oct 25, 2017 · 1 comment
Open

maybe there is an error in RegisterSet.java #142

improvejin opened this issue Oct 25, 2017 · 1 comment

Comments

@improvejin
Copy link

improvejin commented Oct 25, 2017

the line 52 of RegisterSet.java is else if (bits % Integer.SIZE == 0). in function getSizeForCount.

public static int getSizeForCount(int count) {
    int bits = getBits(count);
    if (bits == 0) {
        return 1;
    } else if (bits % Integer.SIZE == 0) {
        return bits;
    } else {
        return bits + 1;
    }
}

the parameter count is the bucket num, RegisterSet.REGISTER_SIZE is the number of bucket per Int, this value is 5. the code "int bits = getBits(count)" return the lenth of int array for bucket, I think the judgement of line 52 should be if(count%REGISTER_SIZE ==0), if the mode is zero, the value of bits is the length of int array for bucket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant