## Description
Currently, the name of `bucket` is a bit confusing, because it is considered a 'table' in literature (as well as the whole hash table). A `bucket` is better described as a 'subtable', which is used by the total hash table to perform cuckoo hashing.
In addition, the constructors `NewTable`, `NewTableBy`, and `NewCustomTable` were given shorter names, because the package name `cuckoo` already implies that `New*` would create a hash table with cuckoo hashing. This package has one use-case, and so it unambiguous what constructors produce.
## Changes
- `NewTable` -> `New`
- `NewTableBy` -> `NewBy`
- `NewCustomTable` -> `NewCustom`
- `bucket` -> `subtable`
### Design Decisions
- I would have renamed `Table` and `subtable` to map equivalents, but 'submap' implies that a certain subsection of the map is contained within it, which isn't quite right.
- I chose not to go with `Map` and `table`, because of the split naming convention.
## Checklist
- [x] Tests pass
- [x] Docs updated
Reviewed-on: #22
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
## Description
The `cuckoo.MinimumLoad()` option was not a very useful option, and prone to error. By removing the ability to modify it, and setting it to something reasonable (like 5%), we can remove a whole set of errors that the user may stumble into.
## Changes
- Remove `MinimumLoad()` option.
- Privated `DefaultMinimumLoad`.
### Design Decisions
- `DefaultMinimumLoad` should be privated because it is no longer an option. The user should not need to interact with it.
## Checklist
- [x] Tests pass
- [x] Docs updated
Reviewed-on: #17
- Added all `Option`-s to the fuzz tests.
- Minimum load is always <=20%.
- Tested all options, and force a panic on all invalid options.
- Capacity must now be non-negative.
- Minimum load should be <=20%, but just put it as a recommendation.
Reviewed-on: #9
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
Moved the implementation of this hash table from `tools/dsa` #1.
Reviewed-on: #1
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>