#include "util.h"
Include dependency graph for hash_classes.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
class | ControlPointHasher |
A hasher for ControlPoints. More... | |
class | TupleHasher< Tuple > |
A template of a hasher for Tuples. More... | |
class | PairHasher< CellA, CellB > |
A template of a hasher for std:pair. More... | |
struct | CastHash< T > |
Each key type in a hash needs a hash function. This takes a key and returns an iteger of type size_t (really an unsigned). Any integer will work, but it helps if the integers are randomly distributed. To achieve this effect, most of the hash functions use the memory addr of the key, remove the last two bits (as mem is aligned on 4 bytes) and multiply by some prime number.
Each key type also needs a equal function. This is a function object that takes two keys and returns a bool determining if they are equal.
Definition in file hash_classes.h.