org.apache.sysds.runtime.compress.colgroup

## Class ColGroupFactory

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.ColGroupFactory

-     public final class ColGroupFactory
      extends Object

  Factory pattern for constructing ColGroups.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColGroupFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AColGroup` | `compress(int[] colIndexes, int rlen, ABitmap ubm, AColGroup.CompressionType compType, CompressionSettings cs, MatrixBlock rawMatrixBlock, double tupleSparsity)` Method for compressing an ColGroup.
    `static List<AColGroup>` | `compressColGroups(MatrixBlock in, CompressedSizeInfo csi, CompressionSettings compSettings, int k)` The actual compression method, that handles the logic of compressing multiple columns together.
    `static AColGroup` | `genColGroupConst(int numRows, int numCols, double value)`
    `static AColGroup` | `getColGroupConst(int numRows, int[] cols, double value)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ColGroupFactory

          public ColGroupFactory()

  - ### Method Detail

    - #### compressColGroups

          public static List<AColGroup> compressColGroups(MatrixBlock in,
                                                          CompressedSizeInfo csi,
                                                          CompressionSettings compSettings,
                                                          int k)

      The actual compression method, that handles the logic of compressing multiple columns together. This method also have the responsibility of correcting any estimation errors previously made.
      Parameters:
        `in` - The input matrix, that could have been transposed if CompSettings was set to do that
        `csi` - The compression Information extracted from the estimation, this contains which groups of columns to compress together
        `compSettings` - The compression settings to construct the compression based on.
        `k` - The degree of parallelism used.
      Returns:
        A Resulting array of ColGroups, containing the compressed information from the input matrix block.

    - #### compress

          public static AColGroup compress(int[] colIndexes,
                                           int rlen,
                                           ABitmap ubm,
                                           AColGroup.CompressionType compType,
                                           CompressionSettings cs,
                                           MatrixBlock rawMatrixBlock,
                                           double tupleSparsity)

      Method for compressing an ColGroup.
      Parameters:
        `colIndexes` - The Column indexes to compress
        `rlen` - The number of rows in the columns
        `ubm` - The Bitmap containing all the data needed for the compression (unless Uncompressed ColGroup)
        `compType` - The CompressionType selected
        `cs` - The compression Settings used for the given compression
        `rawMatrixBlock` - The copy of the original input (maybe transposed) MatrixBlock
        `tupleSparsity` - The sparsity of the ubs entries.
      Returns:
        A Compressed ColGroup

    - #### genColGroupConst

          public static AColGroup genColGroupConst(int numRows,
                                                   int numCols,
                                                   double value)

    - #### getColGroupConst

          public static AColGroup getColGroupConst(int numRows,
                                                   int[] cols,
                                                   double value)

Copyright © 2021 The Apache Software Foundation. All rights reserved.