* Constructor of HashTable. Creates a hash table. * * @param keyDType `dtype` of the table keys. * @param valueDType `dtype` of the table values.
(readonly keyDType: DataType, readonly valueDType: DataType)
| 38 | * @param valueDType `dtype` of the table values. |
| 39 | */ |
| 40 | constructor(readonly keyDType: DataType, readonly valueDType: DataType) { |
| 41 | this.handle = scalar(0); |
| 42 | // tslint:disable-next-line: no-any |
| 43 | this.tensorMap = new Map<any, Tensor>(); |
| 44 | |
| 45 | keep(this.handle); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Dispose the tensors and handle and clear the hashtable. |