AnonymousMutableDenseHashTable

public final class AnonymousMutableDenseHashTable

Creates an empty anonymous mutable hash table that uses tensors as the backing store.

This op creates a new anonymous mutable hash table (as a resource) everytime it is executed, with the specified dtype of its keys and values, returning the resource handle. Each value must be a scalar. Data can be inserted into the table using the insert operations. It does not support the initialization operation.

It uses "open addressing" with quadratic reprobing to resolve collisions.

The table is anonymous in the sense that it can only be accessed by the returned resource handle (e.g. it cannot be looked up by a name in a resource manager). The table will be automatically deleted when all resource handles pointing to it are gone.

Nested Classes

Public Methods

Output<Object>
asOutput()
Returns the symbolic handle of a tensor.
static <T, U> AnonymousMutableDenseHashTable
create(Scope scope, Operand<T> emptyKey, Operand<T> deletedKey, Class<U> valueDtype, Options... options)
Factory method to create a class wrapping a new AnonymousMutableDenseHashTable operation.
static AnonymousMutableDenseHashTable.Options
initialNumBuckets(Long initialNumBuckets)
static AnonymousMutableDenseHashTable.Options
maxLoadFactor(Float maxLoadFactor)
Output<?>
tableHandle()
The resource handle to the newly created hash-table resource.
static AnonymousMutableDenseHashTable.Options
valueShape(Shape valueShape)

Inherited Methods

org.tensorflow.op.PrimitiveOp
final boolean
equals(Object obj)
final int
Operation
op()
Returns the underlying Operation
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.Operand
abstract Output<Object>
asOutput()
Returns the symbolic handle of a tensor.

Public Methods

public Output<Object> asOutput ()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static AnonymousMutableDenseHashTable create (Scope scope, Operand<T> emptyKey, Operand<T> deletedKey, Class<U> valueDtype, Options... options)

Factory method to create a class wrapping a new AnonymousMutableDenseHashTable operation.

Parameters
scope current scope
emptyKey The key used to represent empty key buckets internally. Must not be used in insert or lookup operations.
valueDtype Type of the table values.
options carries optional attributes values
Returns
  • a new instance of AnonymousMutableDenseHashTable

public static AnonymousMutableDenseHashTable.Options initialNumBuckets (Long initialNumBuckets)

Parameters
initialNumBuckets The initial number of hash table buckets. Must be a power to 2.

public static AnonymousMutableDenseHashTable.Options maxLoadFactor (Float maxLoadFactor)

Parameters
maxLoadFactor The maximum ratio between number of entries and number of buckets before growing the table. Must be between 0 and 1.

public Output<?> tableHandle ()

The resource handle to the newly created hash-table resource.

public static AnonymousMutableDenseHashTable.Options valueShape (Shape valueShape)

Parameters
valueShape The shape of each value.