Packages

class DenseTensorBuilder extends TensorBuilder[T] forSome {type T <: TensorBuilder[T]} with BulkTensorBuilder

Build a dense tensor based on input column types and shape, All columns except the last one, must have Primitive#INT representation. The last column type is considered to be value type and determines

Linear Supertypes
BulkTensorBuilder, TensorBuilder[T] forSome {type T <: TensorBuilder[T]}, WriteableTuple[T] forSome {type T <: TensorBuilder[T]}, TypedOperator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DenseTensorBuilder
  2. BulkTensorBuilder
  3. TensorBuilder
  4. WriteableTuple
  5. TypedOperator
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DenseTensorBuilder(tensorType: TensorType)
  2. new DenseTensorBuilder(columnTypes: Array[Representable], shape: Array[Long])

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. def append(): TensorBuilder

    Tells this TensorBuilder that the current row is complete.

    Tells this TensorBuilder that the current row is complete. This method MUST be called after using #setInt, #setFloat, etc. to set all the columns of the current row.

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    DenseTensorBuilder → TensorBuilder
    Annotations
    @Override()
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def build(sort: Boolean): TensorData

    Build the tensor

    Build the tensor

    sort

    if set to true, the built tensor's rows will be sorted lexicographically

    returns

    the built tensor

    Definition Classes
    DenseTensorBuilder → TensorBuilder
    Annotations
    @Override()
  7. def build(values: ByteBuffer): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  8. def build(values: List[_]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  9. def build(booleans: Array[Boolean]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  10. def build(doubles: Array[Double]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  11. def build(longs: Array[Long]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  12. def build(ints: Array[Int]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  13. def build(floats: Array[Float]): TensorData
    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  14. def build(): TensorData

    Build the tensor Does NOT reset the internal state, so if you plan to reuse this instance, call #start() or #start(int) before reusing.

    Build the tensor Does NOT reset the internal state, so if you plan to reuse this instance, call #start() or #start(int) before reusing.

    returns

    the final built tensor, forcing lexicographical sorting.

    Definition Classes
    TensorBuilder
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. def copyColumn(source: TensorIterator, sourceColumn: Int, destinationColumn: Int): T

    Copy a single column from source to this builder.

    Copy a single column from source to this builder.

    source

    the source from which to copy

    sourceColumn

    the index number of the column to be copied from the source

    destinationColumn

    the index number of the column to be written to in this TensorBuilder

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    TensorBuilder
  17. def copyColumns(left: TensorIterator, right: TensorIterator, sourceColumns: Array[Int], leftArity: Int): T
    Definition Classes
    TensorBuilder
  18. def copyColumns(left: TensorIterator, right: TensorIterator, sourceColumns: Array[Int]): T
    Definition Classes
    TensorBuilder
  19. def copyColumns(source: TensorIterator, sourceColumns: Array[Int]): T

    Copy multiple columns from source to this builder.

    Copy multiple columns from source to this builder.

    source

    the source from which to copy

    sourceColumns

    array of indices of the columns to be copied from the source and written to this TensorBuilder. Note that the columns are copied from the source into the same position in this builder; values read from column i are written to column i, etc.

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    TensorBuilder
  20. def copyLeftColumns(source: TensorIterator, count: Int): T

    Copy some left-most columns from source to this builder (slightly more efficient than using an array of columns).

    Copy some left-most columns from source to this builder (slightly more efficient than using an array of columns).

    source

    the source from which to copy

    count

    the number of columns to copy, starting from the leftmost column (index 0)

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    TensorBuilder
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. def getOutputTypes(): Array[Representable]
    Definition Classes
    DenseTensorBuilder → TypedOperator
    Annotations
    @Override()
  26. def getStaticCardinality(): Int

    The full count of the tensor values, ignoring a possible unknown dimension.

    The full count of the tensor values, ignoring a possible unknown dimension.

    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  27. def getTypes(): Array[Representable]

    returns

    the types of all dimensions and the value as a single array.

    Definition Classes
    DenseTensorBuilder → WriteableTuple
    Annotations
    @Override()
  28. def hasVariableCardinality(): Boolean

    If the actual cardinality can be a multiple of the static cardinality, as opposed to exactly equal.

    If the actual cardinality can be a multiple of the static cardinality, as opposed to exactly equal.

    Definition Classes
    DenseTensorBuilder → BulkTensorBuilder
    Annotations
    @Override()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def setBoolean(column: Int, value: Boolean): TensorBuilder

    Sets the specified column to a given boolean

    Sets the specified column to a given boolean

    column

    The column in the tuple to write to

    value

    The double value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → TensorBuilder → WriteableTuple
    Annotations
    @Override()
  35. def setBytes(column: Int, value: Array[Byte]): TensorBuilder

    Sets the specified column to a given byte array

    Sets the specified column to a given byte array

    column

    The column in the tuple to write to

    value

    The byte array value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → WriteableTuple
    Annotations
    @Override()
  36. def setDouble(column: Int, value: Double): TensorBuilder

    Sets the specified column to a given double

    Sets the specified column to a given double

    column

    The column in the tuple to write to

    value

    The double value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → TensorBuilder → WriteableTuple
    Annotations
    @Override()
  37. def setFloat(column: Int, value: Float): TensorBuilder

    Sets the specified column to a given float

    Sets the specified column to a given float

    column

    The column in the tuple to write to

    value

    The float value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → WriteableTuple
    Annotations
    @Override()
  38. def setInt(column: Int, value: Int): TensorBuilder

    DenseTensorBuilder's setInt should be used seldomly.

    DenseTensorBuilder's setInt should be used seldomly. The proper usage to construct DenseTensors is by using the build() method and passing in the associated arrays. By calling setInt for non value columns, the currentIndex is changed to point to the associated location in the value array. It assumes the usage is correct (append one row at a time and not overriding a given column, aka calling setInt on the same column multiple times). Ex of incorrect usage: shape is [2,2] setInt(0, 0), setInt(0, 1) -> Here the currentIndex is set for column 0 with value 0 and then changed to column 0 with value 1. Ex of correct usage: setInt(0,0), setInt(1,0) -> Here the currentIndex is set for column 0 with value 0 and column 1 with value 0. Setting the value here will be associated with the correct currentIndex and the correct row.

    column

    The column in the tuple to write to

    value

    The int value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → WriteableTuple
    Annotations
    @Override()
  39. def setLong(column: Int, value: Long): TensorBuilder

    Sets the specified column to a given long

    Sets the specified column to a given long

    column

    The column in the tuple to write to

    value

    The long value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → WriteableTuple
    Annotations
    @Override()
  40. def setString(column: Int, value: String): TensorBuilder

    Sets the specified column to a given String

    Sets the specified column to a given String

    column

    The column in the tuple to write to

    value

    The String value to be written

    returns

    A reference to this object (this)

    Definition Classes
    DenseTensorBuilder → TensorBuilder → WriteableTuple
    Annotations
    @Override()
  41. def setValue(index: Int, value: Any): T
    Definition Classes
    WriteableTuple
  42. def start(estimatedRows: Int): TensorBuilder

    Initializes this TensorBuilder.

    Initializes this TensorBuilder. This method (or overloaded #start() MUST be called before setting values to this TensorBuilder. This method may also be used to "reset" the builder, enabling it to be reused.

    estimatedRows

    The estimated number of rows in this tensor. Implementations can use this to allocate internal array sizes, for example.

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    DenseTensorBuilder → TensorBuilder
    Annotations
    @Override()
  43. def start(): T

    Initializes this TensorBuilder.

    Initializes this TensorBuilder. This method (or overloaded #start(int) MUST be called before setting values to this TensorBuilder. This method may also be used to "reset" the builder, enabling it to be reused.

    returns

    a reference to this TensorBuilder (this)

    Definition Classes
    TensorBuilder
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from BulkTensorBuilder

Inherited from TensorBuilder[T] forSome {type T <: TensorBuilder[T]}

Inherited from WriteableTuple[T] forSome {type T <: TensorBuilder[T]}

Inherited from TypedOperator

Inherited from AnyRef

Inherited from Any

Ungrouped