Interface TensorIterator

All Superinterfaces:
ReadableTuple
All Known Implementing Classes:
BaseDenseTensorIterator

public interface TensorIterator extends ReadableTuple
TensorIterator is responsible for a range of rows (possibly empty). At every moment of time, one row is current (zero if the range is empty). Both dimensions and the value of the current row are available via getters. Getters of column values are specialized for primitive types to save on an additional object allocation/dereferencing.
  • Method Details

    • getTensorData

      TensorData getTensorData()
    • start

      void start()
      Rewinds the iterator to the beginning of its range.
    • isValid

      boolean isValid()
      Returns:
      if the iterator is still within its range.
    • next

      void next()
      Move iterator to the next row.
    • getCopy

      TensorIterator getCopy()
      Specified by:
      getCopy in interface ReadableTuple
      Returns:
      a copy of the iterator at the current position. Can be used to return to a previously visited position.
    • getValue

      @Deprecated Object getValue(int column)
      Deprecated.
      this should not be used
      Originally created for ease of debugging. Should NOT be used for returning arbitrary objects, only for primitives.
    • getString

      default String getString(int column)
      Specified by:
      getString in interface ReadableTuple
      Returns:
      a String at given column (dimension or value).
    • getDouble

      default double getDouble(int column)
      Specified by:
      getDouble in interface ReadableTuple
      Returns:
      a double at given column (dimension or value).
    • getBoolean

      default boolean getBoolean(int column)
      Specified by:
      getBoolean in interface ReadableTuple
      Returns:
      a boolean at given column (dimension or value)
    • getBytes

      default byte[] getBytes(int column)
      Specified by:
      getBytes in interface ReadableTuple
      Returns:
      a byte array at given column (dimension or value)
    • getTypes

      default Representable[] getTypes()
      Specified by:
      getTypes in interface ReadableTuple