An implementation of a hashtable using a BetterMap that grows so that the number of items never exceeds the number of LinearMaps.
The amortized cost of add should be O(1) provided that the implementation of sum in resize is linear.
Starts with 2 LinearMaps and 0 items.
| name | description | default |
|---|---|---|
| self |
Looks up the key (k) and returns the corresponding value, or raises KeyError if the key is not found.
| name | description | default |
|---|---|---|
| self | ||
| k |
Resize the map if necessary and adds the new item.
| name | description | default |
|---|---|---|
| self | ||
| k | ||
| v |
Makes a new map, twice as big, and rehashes the items.
| name | description | default |
|---|---|---|
| self |