src/core/SimpleMap.h
SimpleMap [Class]
Description
The SimpleMap template class implements a hash map data structure using separate
chaining for collision handling.
Public Methods
SimpleMap(size_t n = 1024)
Constructor initializes the map with the specified bucket count.
Parameters
- n: Number of buckets (default 1024).
void put(const K& key, const V& value)
Inserts or updates a key-value pair.
bool contains(const K& key) const
Checks if a key exists in the map.
Returns
true if the key is found.V& operator[](const K& key)
Accesses or inserts a value by key.
std::vector<K> getKeys() const
Returns a vector of all keys in the map.