THashTableTHashTable implements a hash table to store TObject's. The hash
value is calculated using the value returned by the TObject's
Hash() function. Each class inheriting from TObject can override
Hash() as it sees fit.
THashTable does not preserve the insertion order of the objects.
If the insertion order is important AND fast retrieval is needed
use THashList instead.
/*
*/

Create a THashTable object. Capacity is the initial hashtable capacity
(i.e. number of slots), by default kInitHashTableCapacity = 17, and
rehashlevel is the value at which a rehash will be triggered. I.e. when
the average size of the linked lists at a slot becomes longer than
rehashlevel then the hashtable will be resized and refilled to reduce
the collision rate to about 1. The higher the collision rate, i.e. the
longer the linked lists, the longer lookup will take. If rehashlevel=0
the table will NOT automatically be rehashed. Use Rehash() for manual
rehashing.

Rehash the hashtable. If the collision rate becomes too high (i.e.
the average size of the linked lists become too long) then lookup
efficiency decreases since relatively long lists have to be searched
every time. To improve performance rehash the hashtable. This resizes
the table to newCapacity slots and refills the table. Use
AverageCollisions() to check if you need to rehash. Set checkObjValidity
to kFALSE if you know that all objects in the table are still valid
(i.e. have not been deleted from the system in the meanwhile).

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.