hash_classes.h File Reference

(r1659/r1653)

#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 >


Detailed Description

This file has classes that provide function objects for using the STL hashes.

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.

Author:
Mark J. Olah (mjo@andrew.cmu.edu)

Definition in file hash_classes.h.


Generated on Mon May 24 09:53:31 2010 for TUMBLE by  doxygen 1.5.2