Packages

c

com.linkedin.feathr.common.featurizeddataset

BaseDenseTensorIterator

abstract class BaseDenseTensorIterator extends TensorIterator

The base for custom iterators over dense tensors of ranks 1+. Encapsulates the logic for traversing nested collections, so that it can be shared between e.g. Avro and Spark representations.

Examples:

- A regular tensor of the shape [2, 3]. Numbering of positions: [ [0, 1, 2], [3, 4, 5] ]. The sequence of indices: [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)].

- A ragged tensor of rank 2. Numbering of positions: [ [0, 1], [], [2, 3, 4] ] The sequence of indices: [(0, 0), (0, 1), (2, 0), (2, 1), (2, 2)].

Subclasses are expected to cache their current path through the tree of nested collections. There are as many collections in the cache as the rank of the tensor, starting from the root and ending with the level containing leaves/values: cache[0] = root cache[1] = cache[0][_indices[0]] ... cache[rank] = cache[rank-1][_indices[rank-1]] = current value

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseDenseTensorIterator
  2. TensorIterator
  3. ReadableTuple
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseDenseTensorIterator(original: BaseDenseTensorIterator)
    Attributes
    protected[featurizeddataset]
  2. new BaseDenseTensorIterator(rank: Int)
    Attributes
    protected[featurizeddataset]

Abstract Value Members

  1. abstract def cache(level: Int, childIndex: Int): Boolean

    Fill the level of cache from the childIndex child of the level-1.

    Fill the level of cache from the childIndex child of the level-1.

    returns

    false if j is out of range.

    Attributes
    protected[featurizeddataset]
  2. abstract def cacheRoot(): Unit

    Fill the 0th level of cache with the root.

    Fill the 0th level of cache with the root.

    Attributes
    protected[featurizeddataset]
  3. abstract def getCopy(): TensorIterator

    returns

    a copy of the iterator at the current position. Can be used to return to a previously visited position.

    Definition Classes
    TensorIterator → ReadableTuple
  4. abstract def getFloat(column: Int): Float

    returns

    a float at given column.

    Definition Classes
    ReadableTuple
  5. abstract def getInt(column: Int): Int

    returns

    an int at given column.

    Definition Classes
    ReadableTuple
  6. abstract def getLong(column: Int): Long

    returns

    a long at given column.

    Definition Classes
    ReadableTuple
  7. abstract def getTensorData(): TensorData
    Definition Classes
    TensorIterator
  8. abstract def getValue(column: Int): AnyRef

    Originally created for ease of debugging.

    Originally created for ease of debugging. Should NOT be used for returning arbitrary objects, only for primitives.

    Definition Classes
    TensorIterator
    Annotations
    @Deprecated
    Deprecated

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def getBoolean(column: Int): Boolean

    returns

    a boolean at given column (dimension or value)

    Definition Classes
    TensorIterator → ReadableTuple
  10. def getBytes(column: Int): Array[Byte]

    returns

    a byte array at given column (dimension or value)

    Definition Classes
    TensorIterator → ReadableTuple
    Annotations
    @Override()
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def getDouble(column: Int): Double

    returns

    a double at given column (dimension or value).

    Definition Classes
    TensorIterator → ReadableTuple
    Annotations
    @Override()
  13. final def getFlatIndex(): Int
  14. final def getIndex(dimension: Int): Int
    Attributes
    protected[featurizeddataset]
  15. final def getRank(): Int
    Attributes
    protected[featurizeddataset]
  16. def getString(column: Int): String

    returns

    a String at given column (dimension or value).

    Definition Classes
    TensorIterator → ReadableTuple
    Annotations
    @Override()
  17. def getTypes(): Array[Representable]
    Definition Classes
    TensorIterator → ReadableTuple
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def isValid(): Boolean

    returns

    if the iterator is still within its range.

    Definition Classes
    BaseDenseTensorIterator → TensorIterator
    Annotations
    @Override()
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def next(): Unit

    Move iterator to the next row.

    Move iterator to the next row.

    Definition Classes
    BaseDenseTensorIterator → TensorIterator
    Annotations
    @Override()
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def start(): Unit

    Rewinds the iterator to the beginning of its range.

    Rewinds the iterator to the beginning of its range.

    Definition Classes
    BaseDenseTensorIterator → TensorIterator
    Annotations
    @Override()
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from TensorIterator

Inherited from ReadableTuple

Inherited from AnyRef

Inherited from Any

Ungrouped