Interface EncodingFactory


public interface EncodingFactory
  • Field Details

    • LOG

      static final org.apache.commons.logging.Log LOG
  • Method Details

    • createFromMatrixBlock

      static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols)
      Encode a list of columns together from the input matrix, as if it is cocoded.
      Parameters:
      m - The matrix input to encode
      transposed - If the matrix is transposed in memory
      rowCols - The list of columns to encode.
      Returns:
      An encoded format of the information of the columns.
    • createFromMatrixBlock

      static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, IColIndex rowCols, double[] scaleFactors)
    • createFromMatrixBlockDelta

      static IEncode createFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols)
      Encode a full delta representation of the matrix input taking all rows into account. Note the input matrix should not be delta encoded, but instead while processing, enforcing that we do not allocate more memory.
      Parameters:
      m - The input matrix that is not delta encoded and should not be modified
      transposed - If the input matrix is transposed.
      rowCols - The list of columns to encode
      Returns:
      A delta encoded encoding.
    • createFromMatrixBlockDelta

      static IEncode createFromMatrixBlockDelta(MatrixBlock m, boolean transposed, IColIndex rowCols, int sampleSize)
      Encode a delta representation of the matrix input taking the first "sampleSize" rows into account. Note the input matrix should not be delta encoded, but instead while processing, enforcing that we do not allocate more memory.
      Parameters:
      m - Input matrix that is not delta encoded and should not be modified
      transposed - If the input matrix is transposed.
      rowCols - The list of columns to encode
      sampleSize - The number of rows to consider for the delta encoding (from the beginning)
      Returns:
      A delta encoded encoding.
    • createFromMatrixBlock

      static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol)
      Create encoding of a single specific column inside the matrix input.
      Parameters:
      m - The Matrix to encode a column from
      transposed - If the matrix is in transposed format.
      rowCol - The column index to encode
      Returns:
      An encoded format of the information of this column.
    • createFromMatrixBlock

      static IEncode createFromMatrixBlock(MatrixBlock m, boolean transposed, int rowCol, double[] scaleFactors)
      Create encoding of a single specific column inside the matrix input.
      Parameters:
      m - The Matrix to encode a column from
      transposed - If the matrix is in transposed format.
      rowCol - The column index to encode
      scaleFactors - For quantization-fused compression, scale factors per row, or a single value for entire matrix
      Returns:
      An encoded format of the information of this column.
    • create

      static IEncode create(ColGroupConst c)
    • create

      static IEncode create(ColGroupEmpty c)
    • create

      static IEncode create(AMapToData d)
    • create

      static IEncode create(AMapToData d, AOffset i, int nRow)
    • createSparse

      static SparseEncoding createSparse(AMapToData map, AOffset off, int nRows)