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

    Modifier and Type
    Method
    Description
    void
    addLiteralWord​(long newData)
    Adding literal words directly to the bitmap (for expert use).
    void
    addStreamOfEmptyWords​(boolean v, long number)
    For experts: You want to add many zeroes or ones? This is the method you use.
    void
    addStreamOfLiteralWords​(com.googlecode.javaewah.Buffer buffer, int start, int number)
    if you have several literal words to copy over, this might be faster.
    void
    addStreamOfNegatedLiteralWords​(com.googlecode.javaewah.Buffer buffer, int start, int number)
    Like "addStreamOfLiteralWords" but negates the words being added.
    void
    addWord​(long newData)
    Adding words directly to the bitmap (for expert use).
    void
    Empties the container.
    void
    Sets the size in bits of the bitmap as an *uncompressed* bitmap.
  • Method Details

    • addWord

      void addWord(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
    • addLiteralWord

      void addLiteralWord(long newData)
      Adding literal words directly to the bitmap (for expert use).
      Parameters:
      newData - the word
    • addStreamOfLiteralWords

      void addStreamOfLiteralWords(com.googlecode.javaewah.Buffer 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 words
      start - the starting point in the array
      number - the number of literal words to add
    • addStreamOfEmptyWords

      void 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
    • addStreamOfNegatedLiteralWords

      void addStreamOfNegatedLiteralWords(com.googlecode.javaewah.Buffer buffer, int start, int number)
      Like "addStreamOfLiteralWords" but negates the words being added.
      Parameters:
      buffer - the buffer wrapping the literal words
      start - the starting point in the array
      number - 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()+63)/64 must be equal to (size +63)/64. If needed, the bitmap can be further padded with zeroes.
      Parameters:
      size - the size in bits