Class ColGroupDeltaDDC

All Implemented Interfaces:
Serializable, IContainADictionary, IMapToDataGroup

public class ColGroupDeltaDDC extends ColGroupDDC
Class to encapsulate information about a column group that is first delta encoded then encoded with dense dictionary encoding (DeltaDDC).
See Also:
  • Method Details

    • create

      public static AColGroup create(IColIndex colIndexes, IDictionary dict, AMapToData data, int[] cachedCounts)
    • getCompType

      public AColGroup.CompressionType getCompType()
      Description copied from class: AColGroup
      Obtain the compression type.
      Overrides:
      getCompType in class ColGroupDDC
      Returns:
      How the elements of the column group are compressed.
    • getColGroupType

      public org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType()
      Overrides:
      getColGroupType in class ColGroupDDC
    • read

      public static ColGroupDeltaDDC read(DataInput in) throws IOException
      Throws:
      IOException
    • scalarOperation

      public AColGroup scalarOperation(ScalarOperator op)
      Description copied from class: AColGroup
      Perform the specified scalar operation directly on the compressed column group, without decompressing individual cells if possible.
      Overrides:
      scalarOperation in class ColGroupDDC
      Parameters:
      op - operation to perform
      Returns:
      version of this column group with the operation applied
    • unaryOperation

      public AColGroup unaryOperation(UnaryOperator op)
      Description copied from class: AColGroup
      Perform unary operation on the column group and return a new column group
      Overrides:
      unaryOperation in class ColGroupDDC
      Parameters:
      op - The operation to perform
      Returns:
      The new column group
    • leftMultByMatrixNoPreAgg

      public void leftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu)
      Description copied from class: AColGroup
      Left multiply with this column group.
      Overrides:
      leftMultByMatrixNoPreAgg in class ColGroupDDC
      Parameters:
      matrix - The matrix to multiply with on the left
      result - The result to output the values into, always dense for the purpose of the column groups parallelizing
      rl - The row to begin the multiplication from on the lhs matrix
      ru - The row to end the multiplication at on the lhs matrix
      cl - The column to begin the multiplication from on the lhs matrix
      cu - The column to end the multiplication at on the lhs matrix
    • rightDecompressingMult

      public void rightDecompressingMult(MatrixBlock right, MatrixBlock ret, int rl, int ru, int nRows, int crl, int cru)
      Description copied from class: AColGroup
      Right side Matrix multiplication, iterating though this column group and adding to the ret
      Overrides:
      rightDecompressingMult in class ColGroupDDC
      Parameters:
      right - Right side matrix to multiply with.
      ret - The return matrix to add results to
      rl - The row of this column group to multiply from
      ru - The row of this column group to multiply to (not inclusive)
      nRows - The number of rows in this column group
      crl - The right hand side column lower
      cru - The right hand side column upper
    • preAggregateDense

      public void preAggregateDense(MatrixBlock m, double[] preAgg, int rl, int ru, int cl, int cu)
      Description copied from class: APreAgg
      Pre aggregate a dense matrix block into a pre aggregate target (first step of left matrix multiplication)
      Overrides:
      preAggregateDense in class ColGroupDDC
      Parameters:
      m - The matrix to preAggregate
      preAgg - The preAggregate target
      rl - Row lower on the left side matrix
      ru - Row upper on the left side matrix
      cl - Column lower on the left side matrix (or row lower in the column group)
      cu - Column upper on the left side matrix (or row upper in the column group)
    • preAggregateSparse

      public void preAggregateSparse(SparseBlock sb, double[] preAgg, int rl, int ru, int cl, int cu)
      Overrides:
      preAggregateSparse in class ColGroupDDC
    • preAggregateThatDDCStructure

      public void preAggregateThatDDCStructure(ColGroupDDC that, Dictionary ret)
      Overrides:
      preAggregateThatDDCStructure in class ColGroupDDC
    • preAggregateThatSDCZerosStructure

      public void preAggregateThatSDCZerosStructure(ColGroupSDCZeros that, Dictionary ret)
      Overrides:
      preAggregateThatSDCZerosStructure in class ColGroupDDC
    • preAggregateThatSDCSingleZerosStructure

      public void preAggregateThatSDCSingleZerosStructure(ColGroupSDCSingleZeros that, Dictionary ret)
      Overrides:
      preAggregateThatSDCSingleZerosStructure in class ColGroupDDC
    • containsValue

      public boolean containsValue(double pattern)
      Description copied from class: AColGroup
      Detect if the column group contains a specific value.
      Overrides:
      containsValue in class ColGroupDDC
      Parameters:
      pattern - The value to look for.
      Returns:
      boolean saying true if the value is contained.
    • append

      public AColGroup append(AColGroup g)
      Description copied from class: AColGroup
      Append the other column group to this column group. This method tries to combine them to return a new column group containing both. In some cases it is possible in reasonable time, in others it is not. The result is first this column group followed by the other column group in higher row values. If it is not possible or very inefficient null is returned.
      Overrides:
      append in class ColGroupDDC
      Parameters:
      g - The other column group
      Returns:
      A combined column group or null
    • appendNInternal

      public AColGroup appendNInternal(AColGroup[] g, int blen, int rlen)
      Overrides:
      appendNInternal in class ColGroupDDC
    • getNumberNonZeros

      public long getNumberNonZeros(int nRows)
      Description copied from class: AColGroup
      Get the number of nonZeros contained in this column group.
      Overrides:
      getNumberNonZeros in class AColGroupValue
      Parameters:
      nRows - The number of rows in the column group, this is used for groups that does not contain information about how many rows they have.
      Returns:
      The nnz.
    • sliceRows

      public AColGroup sliceRows(int rl, int ru)
      Description copied from class: AColGroup
      Slice range of rows out of the column group and return a new column group only containing the row segment. Note that this slice should maintain pointers back to the original dictionaries and only modify index structures.
      Overrides:
      sliceRows in class ColGroupDDC
      Parameters:
      rl - The row to start at
      ru - The row to end at (not included)
      Returns:
      A new column group containing the specified row range.