Class AColGroupCompressed

java.lang.Object
org.apache.sysds.runtime.compress.colgroup.AColGroup
org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ADictBasedColGroup, ColGroupEmpty, ColGroupLinearFunctional

public abstract class AColGroupCompressed extends AColGroup
Base class for column groups encoded Encoded in a compressed manner.
See Also:
  • Method Details

    • sameIndexStructure

      public boolean sameIndexStructure(AColGroup that)
      Description copied from class: AColGroup
      Method to determine if the columnGroup have the same index structure as another. Note that the column indexes and dictionaries are allowed to be different.
      Overrides:
      sameIndexStructure in class AColGroup
      Parameters:
      that - the other column group
      Returns:
      if the index is the same.
    • sameIndexStructure

      public abstract boolean sameIndexStructure(AColGroupCompressed that)
    • preAggRows

      public double[] preAggRows(ValueFunction fn)
    • getMin

      public double getMin()
      Description copied from class: AColGroup
      Short hand method for getting minimum value contained in this column group.
      Specified by:
      getMin in class AColGroup
      Returns:
      The minimum value contained in this ColumnGroup
    • getMax

      public double getMax()
      Description copied from class: AColGroup
      Short hand method for getting maximum value contained in this column group.
      Specified by:
      getMax in class AColGroup
      Returns:
      The maximum value contained in this ColumnGroup
    • getSum

      public double getSum(int nRows)
      Description copied from class: AColGroup
      Short hand method for getting the sum of this column group
      Specified by:
      getSum in class AColGroup
      Parameters:
      nRows - The number of rows in the column group
      Returns:
      The sum of this column group
    • unaryAggregateOperations

      public final void unaryAggregateOperations(AggregateUnaryOperator op, double[] c, int nRows, int rl, int ru)
      Description copied from class: AColGroup
      Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed matrix. The range of rl to ru only applies to row aggregates. (ReduceCol)
      Specified by:
      unaryAggregateOperations in class AColGroup
      Parameters:
      op - The operator used
      c - The output matrix block
      nRows - The total number of rows in the Column Group
      rl - The starting row to do aggregation from
      ru - The last row to do aggregation to (not included)
    • unaryAggregateOperations

      public final void unaryAggregateOperations(AggregateUnaryOperator op, double[] c, int nRows, int rl, int ru, double[] preAgg)
    • tsmm

      public final void tsmm(MatrixBlock ret, int nRows)
      Description copied from class: AColGroup
      Do a transposed self matrix multiplication on the left side t(x) %*% x. but only with this column group. This gives better performance since there is no need to iterate through all the rows of the matrix, but the execution can be limited to its number of distinct values. Note it only calculate the upper triangle
      Specified by:
      tsmm in class AColGroup
      Parameters:
      ret - The return matrix block [numColumns x numColumns]
      nRows - The number of rows in the column group
    • isEmpty

      public boolean isEmpty()
      Description copied from class: AColGroup
      Get if the group is only containing zero
      Specified by:
      isEmpty in class AColGroup
      Returns:
      true if empty