org.apache.sysds.runtime.compress.utils

## Class BitmapLossy

- java.lang.Object
- - org.apache.sysds.runtime.compress.utils.ABitmap
  - - org.apache.sysds.runtime.compress.utils.BitmapLossy

-     public final class BitmapLossy
      extends ABitmap

  Uncompressed but Quantized representation of contained data.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.utils.ABitmap

      `ABitmap.BitmapType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitmapLossy(int numCols, IntArrayList[] offsetsLists, int numZeroGroups, byte[] values, double scale)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getNumOffsets()`
    `int` | `getNumOffsets(int ix)`
    `int` | `getNumValues()` Obtain number of distinct values in the column.
    `IntArrayList` | `getOffsetsList(int ix)`
    `double` | `getScale()`
    `ABitmap.BitmapType` | `getType()`
    `byte[]` | `getValues()` Get all values without unnecessary allocations and copies.
    `byte[]` | `getValues(int ix)` Obtain tuple of column values associated with index.
    `void` | `sortValuesByFrequency()`
    `String` | `toString()`

    - ### Methods inherited from class org.apache.sysds.runtime.compress.utils.ABitmap

      `containsZero, getNumColumns, getOffsetList, getZeroCounts`

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

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

- - ### Constructor Detail

    - #### BitmapLossy

          public BitmapLossy(int numCols,
                             IntArrayList[] offsetsLists,
                             int numZeroGroups,
                             byte[] values,
                             double scale)

  - ### Method Detail

    - #### getValues

          public byte[] getValues()

      Get all values without unnecessary allocations and copies.
      Returns:
        dictionary of value tuples

    - #### getValues

          public byte[] getValues(int ix)

      Obtain tuple of column values associated with index.
      Parameters:
        `ix` - index of a particular distinct value
      Returns:
        the tuple of column values associated with the specified index

    - #### getScale

          public double getScale()

    - #### getNumValues

          public int getNumValues()

      Obtain number of distinct values in the column.
      Specified by:
        `getNumValues` in class `ABitmap`
      Returns:
        number of distinct values in the column; this number is also the number of bitmaps, since there is one bitmap per value

    - #### getOffsetsList

          public IntArrayList getOffsetsList(int ix)

      Overrides:
        `getOffsetsList` in class `ABitmap`

    - #### getNumOffsets

          public long getNumOffsets()

      Overrides:
        `getNumOffsets` in class `ABitmap`

    - #### getNumOffsets

          public int getNumOffsets(int ix)

      Overrides:
        `getNumOffsets` in class `ABitmap`

    - #### sortValuesByFrequency

          public void sortValuesByFrequency()

      Specified by:
        `sortValuesByFrequency` in class `ABitmap`

    - #### getType

          public ABitmap.BitmapType getType()

      Specified by:
        `getType` in class `ABitmap`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `ABitmap`

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