Packages

c

com.linkedin.feathr.common.tensorbuilder

UniversalTensorBuilder

final class UniversalTensorBuilder extends ColumnUtils with TensorBuilder[UniversalTensorBuilder]

Builds tensors with columns being a requested permutation of int, long, and float. Am instance of UniversalTensorBuilder can be reused by calling start method.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UniversalTensorBuilder
  2. TensorBuilder
  3. WriteableTuple
  4. TypedOperator
  5. ColumnUtils
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UniversalTensorBuilder(valueArity: Int, columnTypes: <repeated...>[Representable])
  2. new UniversalTensorBuilder(columnTypes: <repeated...>[Representable])

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(): UniversalTensorBuilder

    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
    UniversalTensorBuilder → 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
    UniversalTensorBuilder → TensorBuilder
    Annotations
    @Override()
  7. 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
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def copyColumn(source: TensorIterator, sourceColumn: Int, destinationColumn: Int): UniversalTensorBuilder

    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
  10. def copyColumns(left: TensorIterator, right: TensorIterator, sourceColumns: Array[Int], leftArity: Int): UniversalTensorBuilder
    Definition Classes
    TensorBuilder
  11. def copyColumns(left: TensorIterator, right: TensorIterator, sourceColumns: Array[Int]): UniversalTensorBuilder
    Definition Classes
    TensorBuilder
  12. def copyColumns(source: TensorIterator, sourceColumns: Array[Int]): UniversalTensorBuilder

    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
  13. def copyLeftColumns(source: TensorIterator, count: Int): UniversalTensorBuilder

    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
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def getBooleanArity(): Int
    Definition Classes
    ColumnUtils
  18. def getBytesArity(): Int
    Definition Classes
    ColumnUtils
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def getColumnIndex(): Array[Int]
    Definition Classes
    ColumnUtils
  21. def getColumnTypes(): Array[Representable]
    Definition Classes
    ColumnUtils
  22. def getDoubleArity(): Int
    Definition Classes
    ColumnUtils
  23. def getFloatArity(): Int
    Definition Classes
    ColumnUtils
  24. def getIntArity(): Int
    Definition Classes
    ColumnUtils
  25. def getLongArity(): Int
    Definition Classes
    ColumnUtils
  26. def getOutputTypes(): Array[Representable]
    Definition Classes
    UniversalTensorBuilder → TypedOperator
    Annotations
    @Override()
  27. def getStringArity(): Int
    Definition Classes
    ColumnUtils
  28. def getTypes(): Array[Representable]

    returns

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

    Definition Classes
    UniversalTensorBuilder → WriteableTuple
    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(index: Int, value: Boolean): UniversalTensorBuilder

    Sets the specified column to a given boolean

    Sets the specified column to a given boolean

    value

    The double value to be written

    returns

    A reference to this object (this)

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

    Sets the specified column to a given byte array

    Sets the specified column to a given byte array

    value

    The byte array value to be written

    returns

    A reference to this object (this)

    Definition Classes
    UniversalTensorBuilder → WriteableTuple
    Annotations
    @Override()
  36. def setDouble(index: Int, value: Double): UniversalTensorBuilder

    Sets the specified column to a given double

    Sets the specified column to a given double

    value

    The double value to be written

    returns

    A reference to this object (this)

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

    Sets the specified column to a given float

    Sets the specified column to a given float

    value

    The float value to be written

    returns

    A reference to this object (this)

    Definition Classes
    UniversalTensorBuilder → WriteableTuple
    Annotations
    @Override()
  38. def setInt(index: Int, value: Int): UniversalTensorBuilder

    Sets the specified column to a given int

    Sets the specified column to a given int

    value

    The int value to be written

    returns

    A reference to this object (this)

    Definition Classes
    UniversalTensorBuilder → WriteableTuple
    Annotations
    @Override()
  39. def setLong(index: Int, value: Long): UniversalTensorBuilder

    Sets the specified column to a given long

    Sets the specified column to a given long

    value

    The long value to be written

    returns

    A reference to this object (this)

    Definition Classes
    UniversalTensorBuilder → WriteableTuple
    Annotations
    @Override()
  40. def setString(index: Int, value: String): UniversalTensorBuilder

    Sets the specified column to a given String

    Sets the specified column to a given String

    value

    The String value to be written

    returns

    A reference to this object (this)

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

    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
    UniversalTensorBuilder → TensorBuilder
  43. def start(): UniversalTensorBuilder

    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 TypedOperator

Inherited from ColumnUtils

Inherited from AnyRef

Inherited from Any

Ungrouped