You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In current realisation of Bloom Filter there is a int value for every array item.
privateint [] bitArray;
But the only possible values for that items is 1 or 0, so it would be better to use bit array instead of int array.
There is no bit primitive in Java. boolean values have size of 8 bits so it would be too expensive for our case too. But there is a special collection in standard Java library which can be used as a bit array - BitSet. BitSet store bits in a long array where every long value used as a container for the next 64 bits.
So it would much more effective for memory usage to use BitSet instead of int array.
The text was updated successfully, but these errors were encountered:
In current realisation of Bloom Filter there is a int value for every array item.
But the only possible values for that items is
1
or0
, so it would be better to use bit array instead of int array.There is no bit primitive in Java.
boolean
values have size of 8 bits so it would be too expensive for our case too. But there is a special collection in standard Java library which can be used as a bit array -BitSet
.BitSet
store bits in a long array where every long value used as a container for the next 64 bits.So it would much more effective for memory usage to use
BitSet
instead of int array.The text was updated successfully, but these errors were encountered: