public class ColGroupFactory extends Object
Constructor and Description |
---|
ColGroupFactory() |
Modifier and Type | Method and Description |
---|---|
static List<ColGroup> |
assignColumns(int numCols,
ColGroup[] colGroups,
MatrixBlock rawBlock,
CompressionSettings compSettings)
Method for producing the final ColGroupList stored inside the CompressedMatrixBlock.
|
static ColGroup |
compress(int[] colIndexes,
int rlen,
ABitmap ubm,
ColGroup.CompressionType compType,
CompressionSettings cs,
MatrixBlock rawMatrixBlock)
Method for compressing an ColGroup.
|
static ColGroup[] |
compressColGroups(MatrixBlock in,
HashMap<Integer,Double> compRatios,
List<int[]> groups,
CompressionSettings compSettings,
int k)
The actual compression method, that handles the logic of compressing multiple columns together.
|
public static ColGroup[] compressColGroups(MatrixBlock in, HashMap<Integer,Double> compRatios, List<int[]> groups, CompressionSettings compSettings, int k)
in
- The input matrix, that could have been transposed if CompSettings was set to do thatcompRatios
- The previously computed Compression ratings of individual col indexes.groups
- The column groups to consider compressing together.compSettings
- The compression settings to construct the compression based on.k
- The degree of parallelism used.public static ColGroup compress(int[] colIndexes, int rlen, ABitmap ubm, ColGroup.CompressionType compType, CompressionSettings cs, MatrixBlock rawMatrixBlock)
colIndexes
- The Column indexes to compressrlen
- The number of rows in the columnsubm
- The Bitmap containing all the data needed for the compression (unless Uncompressed
ColGroup)compType
- The CompressionType selectedcs
- The compression Settings used for the given compressionrawMatrixBlock
- The copy of the original input (maybe transposed) MatrixBlockpublic static List<ColGroup> assignColumns(int numCols, ColGroup[] colGroups, MatrixBlock rawBlock, CompressionSettings compSettings)
numCols
- The number of columns in input matrixcolGroups
- The colgroups made to assignrawBlock
- The (maybe transposed) original MatrixBlockcompSettings
- The Compressionsettings used.Copyright © 2020 The Apache Software Foundation. All rights reserved.