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

## Interface IEncode

- All Known Implementing Classes:
    `ConstEncoding`, `DenseEncoding`, `EmptyEncoding`, `SparseEncoding`

      public interface IEncode

  This interface covers an intermediate encoding for the samples to improve the efficiency of the joining of sample column groups.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static org.apache.commons.logging.Log` | `LOG` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `IEncode` | `combine​(IEncode e)` | Combine two encodings, note it should be guaranteed by the caller that the number of unique multiplied does not overflow Integer.
    `static IEncode` | `createFromMatrixBlock​(MatrixBlock m, boolean transposed, int rowCol)` |
    `static IEncode` | `createFromMatrixBlock​(MatrixBlock m, boolean transposed, int[] rowCols)` |
    `static IEncode` | `createFromMatrixBlockDelta​(MatrixBlock m, boolean transposed, int[] rowCols)` |
    `static IEncode` | `createFromMatrixBlockDelta​(MatrixBlock m, boolean transposed, int[] rowCols, int nVals)` |
    `EstimationFactors` | `extractFacts​(int[] cols, int nRows, double tupleSparsity, double matrixSparsity)` |
    `int` | `getUnique()` |
    `boolean` | `isDense()` | Signify if the counts are including zero or without zero.

- - ### Field Detail

    - #### LOG

          static final org.apache.commons.logging.Log LOG

  - ### Method Detail

    - #### createFromMatrixBlock

          static IEncode createFromMatrixBlock​(MatrixBlock m,
                                               boolean transposed,
                                               int[] rowCols)

    - #### createFromMatrixBlockDelta

          static IEncode createFromMatrixBlockDelta​(MatrixBlock m,
                                                    boolean transposed,
                                                    int[] rowCols)

    - #### createFromMatrixBlockDelta

          static IEncode createFromMatrixBlockDelta​(MatrixBlock m,
                                                    boolean transposed,
                                                    int[] rowCols,
                                                    int nVals)

    - #### createFromMatrixBlock

          static IEncode createFromMatrixBlock​(MatrixBlock m,
                                               boolean transposed,
                                               int rowCol)

    - #### combine

          IEncode combine​(IEncode e)

      Combine two encodings, note it should be guaranteed by the caller that the number of unique multiplied does not overflow Integer.
      Parameters:
        `e` - The other side to combine with
      Returns:
        The combined encoding

    - #### getUnique

          int getUnique()

    - #### extractFacts

          EstimationFactors extractFacts​(int[] cols,
                                         int nRows,
                                         double tupleSparsity,
                                         double matrixSparsity)

    - #### isDense

          boolean isDense()

      Signify if the counts are including zero or without zero.
      Returns:
        is dense