org.apache.sysds.runtime.compress.colgroup

## Class ColGroupOffset

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

- All Implemented Interfaces:
    Serializable, Cloneable
  Direct Known Subclasses:
    ColGroupOLE, ColGroupRLE

      public abstract class ColGroupOffset
      extends ColGroupValue

  Base class for column groups encoded with various types of bitmap encoding. NOTES: * OLE: separate storage segment length and bitmaps led to a 30% improvement but not applied because more difficult to support both data layouts at the same time (distributed/local as well as w/ and w/o low-level opt)
  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 Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `estimateInMemorySize()` Get the upper bound estimate of in memory allocation for the column group.
    `int[]` | `getBitmapOffsets()`
    `char[]` | `getBitmaps()`
    `long` | `getExactSizeOnDisk()` Returns the exact serialized size of column group.
    `boolean` | `hasZeros()`
    `void` | `readFields(DataInput in)` Deserialize column group from data input.
    `String` | `toString()`
    `void` | `write(DataOutput out)` Serializes column group to data output.

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

      `addMatrixToResult, addMinMax, allocatePreAggregate, cleanupThreadLocalMemory, containsValue, copy, copyAndSet, copyAndSet, copyAndSet, copyAndSet, decompressToBlockSafe, decompressToBlockUnSafe, getCachedCounts, getCounts, getCounts, getCounts, getCounts, getDictionary, getIfCountsType, getNumberNonZeros, getNumValues, getValues, getValuesAsBlock, isDense, isLossy, leftMultByAColGroup, leftMultByMatrix, leftMultByPreAggregateMatrix, leftMultByPreAggregateMatrix, preAggregate, preAggregateDense, preAggregateThatIndexStructure, replace, rightMultByMatrix, setupLeftMultThreadLocalMemory, setupThreadLocalMemory, tsmm`

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

      `getMax, getMin, getNumRows, unaryAggregateOperations, unaryAggregateOperations`

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

      `binaryRowOp, countNonZerosPerRow, decompressColumnToBlockUnSafe, decompressToBlockUnSafe, get, getColIndices, getCompType, getNumCols, leftMultByMatrix, scalarOperation, shiftColIndices, sliceColumn, sliceColumns`

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

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

- - ### Method Detail

    - #### 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 `ColGroupValue`
      Returns:
        an upper bound on the number of bytes used to store this ColGroup in memory.

    - #### getBitmaps

          public char[] getBitmaps()

    - #### getBitmapOffsets

          public int[] getBitmapOffsets()

    - #### hasZeros

          public boolean hasZeros()

    - #### readFields

          public void readFields(DataInput in)
                          throws IOException

      Description copied from class: `AColGroup`
      Deserialize column group from data input.
      Overrides:
        `readFields` in class `ColGroupValue`
      Parameters:
        `in` - data input
      Throws:
        `IOException` - if IOException occurs

    - #### write

          public void write(DataOutput out)
                     throws IOException

      Description copied from class: `AColGroup`
      Serializes column group to data output.
      Overrides:
        `write` in class `ColGroupValue`
      Parameters:
        `out` - data output
      Throws:
        `IOException` - if IOException occurs

    - #### getExactSizeOnDisk

          public long getExactSizeOnDisk()

      Description copied from class: `AColGroup`
      Returns the exact serialized size of column group. This can be used for example for buffer preallocation.
      Overrides:
        `getExactSizeOnDisk` in class `ColGroupValue`
      Returns:
        exact serialized size for column group

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `ColGroupValue`

Copyright © 2021 The Apache Software Foundation. All rights reserved.