Package org.apache.sysds.runtime.compress.estim

## Class CompressedSizeEstimatorExact

- java.lang.Object
- - org.apache.sysds.runtime.compress.estim.CompressedSizeEstimator
  - - org.apache.sysds.runtime.compress.estim.CompressedSizeEstimatorExact

-     public class CompressedSizeEstimatorExact
      extends CompressedSizeEstimator

  Exact compressed size estimator (examines entire dataset).

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CompressedSizeEstimatorExact​(MatrixBlock data, CompressionSettings compSettings)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CompressedSizeInfoColGroup` | `getColGroupInfo​(int[] colIndexes, int estimate, int nrUniqueUpperBound)` | A method to extract the Compressed Size Info for a given list of columns, This method further limits the estimated number of unique values, since in some cases the estimated number of uniques is estimated higher than the number estimated in sub groups of the given colIndexes.
    `CompressedSizeInfoColGroup` | `getDeltaColGroupInfo​(int[] colIndexes, int estimate, int nrUniqueUpperBound)` | A method to extract the Compressed Size Info for a given list of columns, This method further limits the estimated number of unique values, since in some cases the estimated number of uniques is estimated higher than the number estimated in sub groups of the given colIndexes.

    - ### Methods inherited from class org.apache.sysds.runtime.compress.estim.CompressedSizeEstimator

      `clearNNZ, combine, combine, computeCompressedSizeInfos, getColGroupInfo, getDeltaColGroupInfo`

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

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

- - ### Constructor Detail

    - #### CompressedSizeEstimatorExact

          public CompressedSizeEstimatorExact​(MatrixBlock data,
                                              CompressionSettings compSettings)

  - ### Method Detail

    - #### getColGroupInfo

          public CompressedSizeInfoColGroup getColGroupInfo​(int[] colIndexes,
                                                            int estimate,
                                                            int nrUniqueUpperBound)

      Description copied from class: `CompressedSizeEstimator`
      A method to extract the Compressed Size Info for a given list of columns, This method further limits the estimated number of unique values, since in some cases the estimated number of uniques is estimated higher than the number estimated in sub groups of the given colIndexes.
      Specified by:
        `getColGroupInfo` in class `CompressedSizeEstimator`
      Parameters:
        `colIndexes` - The columns to extract compression information from
        `estimate` - An estimate of number of unique elements in these columns
        `nrUniqueUpperBound` - The upper bound of unique elements allowed in the estimate, can be calculated from the number of unique elements estimated in sub columns multiplied together. This is flexible in the sense that if the sample is small then this unique can be manually edited like in CoCodeCostMatrixMult.
      Returns:
        The CompressedSizeInfoColGroup for the given column indexes.

    - #### getDeltaColGroupInfo

          public CompressedSizeInfoColGroup getDeltaColGroupInfo​(int[] colIndexes,
                                                                 int estimate,
                                                                 int nrUniqueUpperBound)

      Description copied from class: `CompressedSizeEstimator`
      A method to extract the Compressed Size Info for a given list of columns, This method further limits the estimated number of unique values, since in some cases the estimated number of uniques is estimated higher than the number estimated in sub groups of the given colIndexes. The Difference for this method is that it extract the values as delta values from the matrix block input.
      Specified by:
        `getDeltaColGroupInfo` in class `CompressedSizeEstimator`
      Parameters:
        `colIndexes` - The columns to extract compression information from
        `estimate` - An estimate of number of unique delta elements in these columns
        `nrUniqueUpperBound` - The upper bound of unique elements allowed in the estimate, can be calculated from the number of unique elements estimated in sub columns multiplied together. This is flexible in the sense that if the sample is small then this unique can be manually edited like in CoCodeCostMatrixMult.
      Returns:
        The CompressedSizeInfoColGroup for the given column indexes.