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 while also maintaining a data index.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.commons.logging.Log
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract AIterator
    Copy the iterator with the current values.
    boolean
    Unsafe version of equals, note that it should only compare iterators stemming from the same Offset Object.
    abstract int
    Get the current data index associated with the index returned from value.
    abstract int
    Get the current offsets index, that points to the underlying offsets list.
    boolean
    isNotOver(int ub)
    Find out if the current offset is not exceeding the index given.
    abstract int
    Increment the pointers such that the both index and dataIndex is incremented to the next entry.
    void
    setOff(int off)
     
    abstract int
    skipTo(int idx)
    Skip values until index is achieved.
     
    int
    Get the current index value, note this correspond to a row index in the original matrix.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • LOG

      public static final org.apache.commons.logging.Log LOG
  • Method Details

    • next

      public abstract int next()
      Increment the pointers such that the both index and dataIndex is incremented to the next entry.
      Returns:
      The new offset.
    • 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.
    • setOff

      public void setOff(int off)
    • isNotOver

      public boolean isNotOver(int ub)
      Find out if the current offset is not exceeding the index given.
      Parameters:
      ub - The offset to not exceed
      Returns:
      boolean if it is exceeded.
    • getDataIndex

      public abstract int getDataIndex()
      Get the current data index associated with the index returned from value. This index points to a position in the AMapToData object, that can be used to lookup the dictionary entry in ADictionary.
      Returns:
      The Data Index.
    • getOffsetsIndex

      public abstract int getOffsetsIndex()
      Get the current offsets index, that points to the underlying offsets list. This is available for debugging purposes, not to be used for the calling classes.
      Returns:
      The Offsets Index.
    • skipTo

      public abstract int skipTo(int idx)
      Skip values until index is achieved.
      Parameters:
      idx - The index to skip to.
      Returns:
      the index that follows or are equal to the skip to index.
    • clone

      public abstract AIterator clone()
      Copy the iterator with the current values.
    • equals

      public boolean equals(AIterator o)
      Unsafe version of equals, note that it should only compare iterators stemming from the same Offset Object.
      Parameters:
      o - The Iterator to compare
      Returns:
      The result
    • toString

      public String toString()
      Overrides:
      toString in class Object