Class ColGroupRLE

    • Method Detail

      • getColGroupType

        public org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType()
      • 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.
        Specified by:
        scalarOperation in class AColGroup
        Parameters:
        op - operation to perform
        Returns:
        version of this column group with the operation applied
      • binaryRowOpLeft

        public AColGroup binaryRowOpLeft​(BinaryOperator op,
                                         double[] v,
                                         boolean isRowSafe)
        Description copied from class: AColGroup
        Perform a binary row operation.
        Specified by:
        binaryRowOpLeft in class AColGroup
        Parameters:
        op - The operation to execute
        v - The vector of values to apply, should be same length as dictionary length.
        isRowSafe - True if the binary op is applied to an entire zero row and all results are zero
        Returns:
        A updated column group with the new values.
      • binaryRowOpRight

        public AColGroup binaryRowOpRight​(BinaryOperator op,
                                          double[] v,
                                          boolean isRowSafe)
        Description copied from class: AColGroup
        Perform a binary row operation.
        Specified by:
        binaryRowOpRight in class AColGroup
        Parameters:
        op - The operation to execute
        v - The vector of values to apply, should be same length as dictionary length.
        isRowSafe - True if the binary op is applied to an entire zero row and all results are zero
        Returns:
        A updated column group with the new values.
      • computeZeroIndicatorVector

        public boolean[] computeZeroIndicatorVector()
      • getIdx

        public double getIdx​(int r,
                             int colIdx)
        Description copied from class: AColGroup
        Get the value at a colGroup specific row/column index position.
        Specified by:
        getIdx in class AColGroup
        Parameters:
        r - row
        colIdx - column index in the _colIndexes.
        Returns:
        value at the row/column index position
      • 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.
        Specified by:
        leftMultByMatrixNoPreAgg in class AColGroup
        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
      • leftMultByAColGroup

        public void leftMultByAColGroup​(AColGroup lhs,
                                        MatrixBlock result)
        Description copied from class: AColGroup
        Left side matrix multiplication with a column group that is transposed.
        Specified by:
        leftMultByAColGroup in class AColGroup
        Parameters:
        lhs - The left hand side Column group to multiply with, the left hand side should be considered transposed.
        result - The result matrix to insert the result of the multiplication into
      • tsmmAColGroup

        public void tsmmAColGroup​(AColGroup other,
                                  MatrixBlock result)
        Description copied from class: AColGroup
        Matrix multiply with this other column group, but: 1. Only output upper triangle values. 2. Multiply both ways with "this" being on the left and on the right. It should be guaranteed that the input is not the same as the caller of the method. The second step is achievable by treating the initial multiplied matrix, and adding its values to the correct locations in the output.
        Specified by:
        tsmmAColGroup in class AColGroup
        Parameters:
        other - The other Column group to multiply with
        result - The result matrix to put the results into
      • genRLEBitmap

        public static char[] genRLEBitmap​(int[] offsets,
                                          int len)
        Encodes the bitmap as a series of run lengths and offsets. Note that this method should not be called if the len is 0.
        Parameters:
        offsets - uncompressed offset list
        len - logical length of the given offset list
        Returns:
        compressed version of said bitmap