Package org.apache.sysds.runtime.compress.bitmap

# Class ABitmap

java.lang.Object
org.apache.sysds.runtime.compress.bitmap.ABitmap

Direct Known Subclasses:
  `Bitmap`, `MultiColBitmap`

public abstract class ABitmap extends Object

## Method Summary

Modifier and Type
Method
Description
`final boolean`
`containsZero()`
Find out if the map contains zeros.
`abstract int`
`getNumColumns()`
Get the number of columns encoded in this bitmap
`abstract int`
`getNumNonZerosInOffset(int idx)`
Get the number of non zeros in a specific offset's tuple value.
`final long`
`getNumOffsets()`
Get the sum of offsets contained.
`final int`
`getNumOffsets(int ix)`
Get the number of offsets for a specific unique offset.
`final int`
`getNumValues()`
Obtain number of distinct value groups in the column.
`final int`
`getNumZeros()`
Get the number of zero tuples contained in this bitmap.
`final IntArrayList[]`
`getOffsetList()`
Get all the offset lists.
`final IntArrayList`
`getOffsetsList(int idx)`
Get a specific offset list.
`String`
`toString()`

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

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

## Method Details

### getOffsetList

public final IntArrayList[] getOffsetList()
Get all the offset lists.

Returns:
  the contained offset lists

### getOffsetsList

public final IntArrayList getOffsetsList(int idx)
Get a specific offset list.

Parameters:
  `idx` - The index to look at inside the contained array
Returns:
  the Offset list at the index

### getNumOffsets

public final long getNumOffsets()
Get the sum of offsets contained.

Returns:
  The sum of offsets

### getNumOffsets

public final int getNumOffsets(int ix)
Get the number of offsets for a specific unique offset.

Parameters:
  `ix` - The offset index.
Returns:
  The number of offsets for this unique value.

### getNumZeros

public final int getNumZeros()
Get the number of zero tuples contained in this bitmap.

Returns:
  The number of zero tuples

### containsZero

public final boolean containsZero()
Find out if the map contains zeros.

Returns:
  A boolean specifying if the bitmap contains zero offsets

### getNumValues

public final int getNumValues()
Obtain number of distinct value groups in the column. this number is also the number of bitmaps, since there is one bitmap per value

Returns:
  number of distinct value groups in the column;

### getNumNonZerosInOffset

public abstract int getNumNonZerosInOffset(int idx)
Get the number of non zeros in a specific offset's tuple value.

Parameters:
  `idx` - The offset index to look at.
Returns:
  The nnz in the tuple.

### getNumColumns

public abstract int getNumColumns()
Get the number of columns encoded in this bitmap

Returns:
  The column count

### toString

public String toString()

Overrides:
  `toString` in class `Object`