[vtk-developers] hast table in VTK
Brad King
brad.king at kitware.com
Thu Dec 9 13:09:17 EST 2004
Moreland, Kenneth wrote:
> The pointer value is not always a valid value to hash on. Sometimes
> objects that have different pointers can be considered equal.
In that case the object is not stored in the map and really is a key to
something else, even if it is an object considered equal.
If the pointer value is not the key then I don't think a single hash key
virtual function will work either. The key to use for the object could
change depending on the application of the hash table. Instead I
suggest that the objects be stored paired with another key on which the
hash function is defined.
-Brad
More information about the vtk-developers
mailing list