org.apache.sysds.runtime.compress.colgroup.offset

## Class AIterator

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.offset.AIterator

    public abstract class AIterator
    extends Object

Iterator interface, that returns a iterator of the indexes (not offsets)

### Constructor Summary

Constructors
Constructor and Description
`AIterator()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`int` `getDataIndex()` Get the current data index associated with the index returned from value.
`int` `getDataIndexAndIncrement()` Get the current data index and increment the pointers using the next operator.
`abstract boolean` `hasNext()` Get a boolean specifying if the iterator is done
`abstract void` `next()` Increment the pointers such that the both index and dataIndex is incremented to the next entry.
`int` `skipTo(int index)` Skip values until index is achieved.
`int` `value()` Get the current index value, note this correspond to a row index in the original matrix.
`int` `valueAndIncrement()` Get the current index value and increment the pointers

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

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

### Constructor Detail

#### AIterator

    public AIterator()

### Method Detail

#### next

    public abstract void next()

Increment the pointers such that the both index and dataIndex is incremented to the next entry.

#### hasNext

    public abstract boolean hasNext()

Get a boolean specifying if the iterator is done

Returns:
  A boolean that is true if there are more values contained in the Iterator.

#### value

    public int value()

Get the current index value, note this correspond to a row index in the original matrix.

Returns:
  The current value pointed at.

#### valueAndIncrement

    public int valueAndIncrement()

Get the current index value and increment the pointers

Returns:
  The current value pointed at.

#### getDataIndex

    public int getDataIndex()

Get the current data index associated with the index returned from value.

Returns:
  The data Index.

#### getDataIndexAndIncrement

    public int getDataIndexAndIncrement()

Get the current data index and increment the pointers using the next operator.

Returns:
  The current data index.

#### skipTo

    public int skipTo(int index)

Skip values until index is achieved.

Parameters:
  `index` - The index to skip to.
Returns:
  the index that follows or are equal to the skip to index.