next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > hash tables > MutableHashTable

MutableHashTable -- the class of all mutable hash tables

Description

A mutable hash table is a type of hash table whose entries can be changed.

Normally the entries in a mutable hash table are not printed, to prevent infinite loops in the printing routines. To print them out, use peek.

i1 : x = new MutableHashTable

o1 = MutableHashTable{}

o1 : MutableHashTable
i2 : scan(0 .. 30, i -> x#i = i^2)
i3 : x # 20

o3 = 400
i4 : x #? 40

o4 = false

See also

Types of mutable hash table :

Fixed objects of class MutableHashTable :

For the programmer

The object MutableHashTable is a type, with ancestor classes HashTable < Thing.