org.apache.sysds.runtime.compress.colgroup

## Class ColGroupCompressed

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.AColGroup
  - - org.apache.sysds.runtime.compress.colgroup.ColGroupCompressed

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ColGroupEmpty, ColGroupValue

    public abstract class ColGroupCompressed
    extends AColGroup

Base class for column groups encoded Encoded in a compressed manner.

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 void` `addMinMax(double[] ret)`
`long` `estimateInMemorySize()` Get the upper bound estimate of in memory allocation for the column group.
`double` `getMax()` Short hand method for getting maximum value contained in this column group.
`double` `getMin()` Short hand method for getting minimum value contained in this column group.
`int` `getNumRows()` Get number of rows contained in the ColGroup.
`abstract double[]` `getValues()` Get all the values in the colGroup.
`abstract boolean` `isLossy()` Is Lossy
`String` `toString()`
`void` `unaryAggregateOperations(AggregateUnaryOperator op, double[] c)` Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed matrix.
`void` `unaryAggregateOperations(AggregateUnaryOperator op, double[] c, int rl, int ru)` Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed matrix.

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

`binaryRowOp, containsValue, copy, countNonZerosPerRow, decompressColumnToBlockUnSafe, decompressToBlockSafe, decompressToBlockUnSafe, decompressToBlockUnSafe, get, getColIndices, getCompType, getExactSizeOnDisk, getNumberNonZeros, getNumCols, getNumValues, getValuesAsBlock, isDense, leftMultByAColGroup, leftMultByMatrix, leftMultByMatrix, readFields, replace, rightMultByMatrix, scalarOperation, shiftColIndices, sliceColumn, sliceColumns, tsmm, tsmm, write`

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

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

### Method Detail

#### getValues

    public abstract double[] getValues()

Description copied from class: `AColGroup`
Get all the values in the colGroup. Note that this is only the stored values not the way they are stored. Making the output a list of values used in that colGroup not the actual full column.

Specified by:
  `getValues` in class `AColGroup`
Returns:
  a double list of values.

#### addMinMax

    public abstract void addMinMax(double[] ret)

#### isLossy

    public abstract boolean isLossy()

Description copied from class: `AColGroup`
Is Lossy

Specified by:
  `isLossy` in class `AColGroup`
Returns:
  returns if the ColGroup is compressed in a lossy manner.

#### getMin

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

#### unaryAggregateOperations

    public final void unaryAggregateOperations(AggregateUnaryOperator op,
                                               double[] c)

Description copied from class: `AColGroup`
Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed matrix.

Specified by:
  `unaryAggregateOperations` in class `AColGroup`
Parameters:
  `op` - The operator used
  `c` - Rhe output matrix block.

#### unaryAggregateOperations

    public final void unaryAggregateOperations(AggregateUnaryOperator op,
                                               double[] c,
                                               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.

Specified by:
  `unaryAggregateOperations` in class `AColGroup`
Parameters:
  `op` - The operator used
  `c` - The output matrix block.
  `rl` - The Starting Row to do aggregation from
  `ru` - The last Row to do aggregation to (not included)

#### toString

    public String toString()

Overrides:
  `toString` in class `AColGroup`

#### getNumRows

    public final int getNumRows()

Description copied from class: `AColGroup`
Get number of rows contained in the ColGroup.

Specified by:
  `getNumRows` in class `AColGroup`
Returns:
  An integer that is the number of rows.

#### estimateInMemorySize

    public long estimateInMemorySize()

Description copied from class: `AColGroup`
Get the upper bound estimate of in memory allocation for the column group.

Overrides:
  `estimateInMemorySize` in class `AColGroup`
Returns:
  an upper bound on the number of bytes used to store this ColGroup in memory.