javaewah
Interface BitmapStorage

All Known Implementing Classes:
BitCounter, EWAHCompressedBitmap, NonEmptyVirtualStorage

public interface BitmapStorage

Low level bitset writing methods.

Since:
0.4.0
Author:
David McIntosh

Method Summary
 int add(long newdata)
          Adding words directly to the bitmap (for expert use).
 long addStreamOfDirtyWords(long[] data, long start, long number)
          if you have several dirty words to copy over, this might be faster.
 int addStreamOfEmptyWords(boolean v, long number)
          For experts: You want to add many zeroes or ones? This is the method you use.
 long addStreamOfNegatedDirtyWords(long[] data, long start, long number)
          Like "addStreamOfDirtyWords" but negates the words being added.
 void setSizeInBits(int bits)
          directly set the sizeinbits field
 

Method Detail

add

int add(long 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
Returns:
the number of words added to the buffer

addStreamOfEmptyWords

int addStreamOfEmptyWords(boolean v,
                          long number)
For experts: You want to add many zeroes or ones? This is the method you use.

Parameters:
v - zeros or ones
number - how many to words add
Returns:
the number of words added to the buffer

addStreamOfDirtyWords

long addStreamOfDirtyWords(long[] data,
                           long start,
                           long number)
if you have several dirty words to copy over, this might be faster.

Parameters:
data - the dirty words
start - the starting point in the array
number - the number of dirty words to add
Returns:
how many (compressed) words were added to the bitmap

addStreamOfNegatedDirtyWords

long addStreamOfNegatedDirtyWords(long[] data,
                                  long start,
                                  long number)
Like "addStreamOfDirtyWords" but negates the words being added.

Parameters:
data - the dirty words
start - the starting point in the array
number - the number of dirty words to add
Returns:
how many (compressed) words were added to the bitmap

setSizeInBits

void setSizeInBits(int bits)
directly set the sizeinbits field

Parameters:
bits - number of bits


Copyright © 2012. All Rights Reserved.