Class BitmapEncoder
java.lang.Object
org.apache.sysds.runtime.compress.bitmap.BitmapEncoder
Static functions for extracting bitmaps from a MatrixBlock.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ABitmapextractBitmap(IColIndex colIndices, MatrixBlock rawBlock, boolean transposed, int estimatedNumberOfUniques, boolean sortedEntries) Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block.static ABitmapextractBitmap(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.static ABitmapextractBitmap(IColIndex colIndices, MatrixBlock rawBlock, int estimatedNumberOfUniques, CompressionSettings cs)
-
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 extractrawBlock- 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 extractrawBlock- 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 tuplesscaleFactors- For quantization-fused compression, scale factors per row, or a single value for entire matrix- Returns:
- Uncompressed bitmap representation of the columns specified
-