Package com.googlecode.javaewah32
Interface BitmapStorage32
-
- All Known Implementing Classes:
BitCounter32,EWAHCompressedBitmap32,NonEmptyVirtualStorage32
public interface BitmapStorage32Low level bitset writing methods.- Since:
- 0.5.0
- Author:
- Daniel Lemire and David McIntosh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLiteralWord(int newData)Adding literal words directly to the bitmap (for expert use).voidaddStreamOfEmptyWords(boolean v, int number)For experts: You want to add many zeroes or ones? This is the method you use.voidaddStreamOfLiteralWords(com.googlecode.javaewah32.Buffer32 buffer, int start, int number)if you have several literal words to copy over, this might be faster.voidaddStreamOfNegatedLiteralWords(com.googlecode.javaewah32.Buffer32 buffer, int start, int number)Like "addStreamOfLiteralWords" but negates the words being added.voidaddWord(int newData)Adding words directly to the bitmap (for expert use).voidclear()Empties the container.voidsetSizeInBitsWithinLastWord(int size)Sets the size in bits of the bitmap as an *uncompressed* bitmap.
-
-
-
Method Detail
-
addWord
void addWord(int newData)
Adding words directly to the bitmap (for expert use). This is normally how you add data to the array. So you add bits in streams of 8*8 bits.- Parameters:
newData- the word
-
addLiteralWord
void addLiteralWord(int newData)
Adding literal words directly to the bitmap (for expert use).- Parameters:
newData- the word
-
addStreamOfLiteralWords
void addStreamOfLiteralWords(com.googlecode.javaewah32.Buffer32 buffer, int start, int number)if you have several literal words to copy over, this might be faster.- Parameters:
buffer- the buffer wrapping the literal wordsstart- the starting point in the arraynumber- the number of literal words to add
-
addStreamOfEmptyWords
void addStreamOfEmptyWords(boolean v, int number)For experts: You want to add many zeroes or ones? This is the method you use.- Parameters:
v- zeros or onesnumber- how many to words add
-
addStreamOfNegatedLiteralWords
void addStreamOfNegatedLiteralWords(com.googlecode.javaewah32.Buffer32 buffer, int start, int number)Like "addStreamOfLiteralWords" but negates the words being added.- Parameters:
buffer- the buffer wrapping the literal wordsstart- the starting point in the arraynumber- the number of literal words to add
-
clear
void clear()
Empties the container.
-
setSizeInBitsWithinLastWord
void setSizeInBitsWithinLastWord(int size)
Sets the size in bits of the bitmap as an *uncompressed* bitmap. Normally, this is used to reduce the size of the bitmaps within the scope of the last word. Specifically, this means that (sizeInBits()+31)/32 must be equal to (size+31)/32. If needed, the bitmap can be further padded with zeroes.- Parameters:
size- the size in bits
-
-