org.apache.sysds.runtime.compress

## Class CompressedMatrixBlockFactory

- java.lang.Object
- - org.apache.sysds.runtime.compress.CompressedMatrixBlockFactory

-     public class CompressedMatrixBlockFactory
      extends Object

  Factory pattern to construct a CompressedMatrixBlock.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedMatrixBlockFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics>` | `compress(MatrixBlock mb)`
    `static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics>` | `compress(MatrixBlock mb, CompressionSettings customSettings)`
    `static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics>` | `compress(MatrixBlock mb, int k)`
    `static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics>` | `compress(MatrixBlock mb, int k, CompressionSettings compSettings)` The main method for compressing the input matrix.

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

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

- - ### Constructor Detail

    - #### CompressedMatrixBlockFactory

          public CompressedMatrixBlockFactory()

  - ### Method Detail

    - #### compress

          public static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics> compress(MatrixBlock mb)

    - #### compress

          public static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics> compress(MatrixBlock mb,
                                                                                                        CompressionSettings customSettings)

    - #### compress

          public static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics> compress(MatrixBlock mb,
                                                                                                        int k)

    - #### compress

          public static org.apache.commons.lang3.tuple.Pair<MatrixBlock,CompressionStatistics> compress(MatrixBlock mb,
                                                                                                        int k,
                                                                                                        CompressionSettings compSettings)

      The main method for compressing the input matrix. SAMPLE-BASED DECISIONS: Decisions such as testing if a column is amenable to bitmap compression or evaluating co-coding potentials are made based on a subset of the rows. For large data sets, sampling might take a significant amount of time. So, we generate only one sample and use it for the entire compression process. Once the compression plan is selected based on sampling, the plan is verified and decisions are overwritten by full estimates.
      Parameters:
        `mb` - The matrix block to compress
        `k` - The number of threads used to execute the compression
        `compSettings` - The Compression settings used
      Returns:
        A compressed matrix block.

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