Class BitmapEncoder

java.lang.Object
org.apache.sysds.runtime.compress.bitmap.BitmapEncoder

public class BitmapEncoder extends Object
Static functions for extracting bitmaps from a MatrixBlock.
  • Constructor Details

    • BitmapEncoder

      public BitmapEncoder()
  • Method Details

    • extractBitmap

      public static ABitmap extractBitmap(IColIndex colIndices, MatrixBlock rawBlock, int estimatedNumberOfUniques, CompressionSettings cs)
    • extractBitmap

      public static ABitmap extractBitmap(IColIndex colIndices, MatrixBlock rawBlock, boolean transposed, int estimatedNumberOfUniques, boolean sortedEntries)
      Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block. if the rawBlock is transposed and sparse it should be guaranteed that the rows specified are not empty, aka all zero.
      Parameters:
      colIndices - Indexes (within the block) of the columns to extract
      rawBlock - An uncompressed matrix block; can be dense, sparse, empty, or null (not Compressed!)
      transposed - Boolean specifying if the rawBlock was transposed.
      estimatedNumberOfUniques - The number of estimated uniques inside this group. Used to allocated the HashMaps.
      sortedEntries - Boolean specifying if the entries should be sorted based on frequency of tuples
      Returns:
      Uncompressed bitmap representation of the columns specified
    • extractBitmap

      public static ABitmap extractBitmap(IColIndex colIndices, MatrixBlock rawBlock, boolean transposed, int estimatedNumberOfUniques, boolean sortedEntries, double[] scaleFactors)
      Generate quantization-fused uncompressed bitmaps for a set of columns in an uncompressed matrix block. if the rawBlock is transposed and sparse it should be guaranteed that the rows specified are not empty, aka all zero.
      Parameters:
      colIndices - Indexes (within the block) of the columns to extract
      rawBlock - An uncompressed matrix block; can be dense, sparse, empty, or null (not Compressed!)
      transposed - Boolean specifying if the rawBlock was transposed.
      estimatedNumberOfUniques - The number of estimated uniques inside this group. Used to allocated the HashMaps.
      sortedEntries - Boolean specifying if the entries should be sorted based on frequency of tuples
      scaleFactors - For quantization-fused compression, scale factors per row, or a single value for entire matrix
      Returns:
      Uncompressed bitmap representation of the columns specified