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
- Alphabetic
- By Inheritance
- BaseDenseTensorIterator
- TensorIterator
- ReadableTuple
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BaseDenseTensorIterator(original: BaseDenseTensorIterator)
- Attributes
- protected[featurizeddataset]
-
new
BaseDenseTensorIterator(rank: Int)
- Attributes
- protected[featurizeddataset]
Abstract Value Members
-
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]
-
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]
-
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
-
abstract
def
getFloat(column: Int): Float
- returns
a float at given column.
- Definition Classes
- ReadableTuple
-
abstract
def
getInt(column: Int): Int
- returns
an int at given column.
- Definition Classes
- ReadableTuple
-
abstract
def
getLong(column: Int): Long
- returns
a long at given column.
- Definition Classes
- ReadableTuple
-
abstract
def
getTensorData(): TensorData
- Definition Classes
- TensorIterator
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
getBoolean(column: Int): Boolean
- returns
a boolean at given column (dimension or value)
- Definition Classes
- TensorIterator → ReadableTuple
-
def
getBytes(column: Int): Array[Byte]
- returns
a byte array at given column (dimension or value)
- Definition Classes
- TensorIterator → ReadableTuple
- Annotations
- @Override()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDouble(column: Int): Double
- returns
a double at given column (dimension or value).
- Definition Classes
- TensorIterator → ReadableTuple
- Annotations
- @Override()
- final def getFlatIndex(): Int
-
final
def
getIndex(dimension: Int): Int
- Attributes
- protected[featurizeddataset]
-
final
def
getRank(): Int
- Attributes
- protected[featurizeddataset]
-
def
getString(column: Int): String
- returns
a String at given column (dimension or value).
- Definition Classes
- TensorIterator → ReadableTuple
- Annotations
- @Override()
-
def
getTypes(): Array[Representable]
- Definition Classes
- TensorIterator → ReadableTuple
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isValid(): Boolean
- returns
if the iterator is still within its range.
- Definition Classes
- BaseDenseTensorIterator → TensorIterator
- Annotations
- @Override()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next(): Unit
Move iterator to the next row.
Move iterator to the next row.
- Definition Classes
- BaseDenseTensorIterator → TensorIterator
- Annotations
- @Override()
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()