Package org.apache.sysds.runtime.compress.colgroup

## Class AMorphingMMColGroup

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.AColGroup
  - - org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
    - - org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
      - - org.apache.sysds.runtime.compress.colgroup.AColGroupValue
        - - org.apache.sysds.runtime.compress.colgroup.AMorphingMMColGroup

All Implemented Interfaces:
  `Serializable`, `IContainADictionary`

Direct Known Subclasses:
  `ASDC`, `ColGroupDDCFOR`

    public abstract class AMorphingMMColGroup
    extends AColGroupValue

Abstract class for column group types that do not perform matrix Multiplication, and decompression for performance reasons but instead transforms into another type of column group type to perform that operation.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup

`AColGroup.CompressionType`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract AColGroup` `extractCommon​(double[] constV)` extract common value from group and return non morphing group
`abstract double[]` `getCommon()` Get common vector, note this should not materialize anything but simply point to things that are already allocated.
`void` `leftMultByAColGroup​(AColGroup lhs, MatrixBlock result, int nRows)` Left side matrix multiplication with a column group that is transposed.
`void` `leftMultByMatrixNoPreAgg​(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu)` Left multiply with this column group.
`void` `tsmmAColGroup​(AColGroup other, MatrixBlock result)` Matrix multiply with this other column group, but: 1.

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupValue

`centralMoment, clear, computeColSums, estimateInMemorySize, getCounts, getNumberNonZeros, getNumValues, replace, rexpandCols, toString`

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup

`copyAndSet, copyAndSet, decompressToDenseBlock, decompressToSparseBlock, getDictionary, getExactSizeOnDisk, rightMultByMatrix, write`

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed

`getMax, getMin, getSum, isEmpty, preAggRows, sameIndexStructure, tsmm, unaryAggregateOperations, unaryAggregateOperations`

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup

`addVector, append, appendN, binaryRowOpLeft, binaryRowOpRight, colSum, combine, containsValue, decompressToDenseBlock, decompressToSparseBlock, get, getColIndices, getCompressionInfo, getCompressionScheme, getCompType, getCost, getEncoding, getIdx, getNumCols, morph, recompress, rightMultByMatrix, scalarOperation, shiftColIndices, sliceColumn, sliceColumns, sliceRows, sortColumnIndexes, unaryOperation`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### leftMultByMatrixNoPreAgg

    public final 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 final void leftMultByAColGroup​(AColGroup lhs,
                                          MatrixBlock result,
                                          int nRows)

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. Also it should be guaranteed that this column group is not empty.
  `result` - The result matrix to insert the result of the multiplication into
  `nRows` - Number of rows in the lhs colGroup

#### tsmmAColGroup

    public final 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

#### extractCommon

    public abstract AColGroup extractCommon​(double[] constV)

extract common value from group and return non morphing group

Parameters:
  `constV` - a vector to contain all values, note length = nCols in total matrix.
Returns:
  A non morphing column group with decompression instructions.

#### getCommon

    public abstract double[] getCommon()

Get common vector, note this should not materialize anything but simply point to things that are already allocated.

Returns:
  the common double vector