Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

hash Namespace Reference


Classes

class  H3HashFunction
struct  ItemBucketSingle
 Bucket for a specific item type. More...
class  ItemTableSingle
 Hash table for singly linked buckets with items of fixed size. More...
class  StreamHasher
 Hasher class to hash on generic streams of data. More...
struct  SingleBucket_t
 Single linked buckets info contains the hash value and possible other data: (info & mask) free for data, (info & ~mask) reserved. More...
struct  SingleBucket
struct  DoubleBucket_t
 Double linked buckets, as for single buckets. More...
struct  DoubleBucket
class  AbstractTable
 Abstract general hash table. More...
class  TableSingle
class  TableDouble
class  TinyTable

Functions

void rehash (SingleBucket_t ***tablePtr, uint32_t *maskPtr)
 Rehashing for singled linked buckets.
void rehash (DoubleBucket_t ***tablePtr, uint32_t *maskPtr)
 Rehashing for double linked buckets.


Function Documentation

void hash::rehash DoubleBucket_t ***  oldTablePtr,
uint32_t *  maskPtr
 

Rehashing for double linked buckets.

Same as the previous rehash with the difference on the type of the buckets: { bucket_t *next; bucket_t **previous; uint info; custom data }

void hash::rehash SingleBucket_t ***  tablePtr,
uint32_t *  maskPtr
 

Rehashing for singled linked buckets.

In practice, the hash value is not recomputed since it is stored in the 'info' field of the buckets.

Parameters:
tablePtr,: where the table of bucket* to rehash is. The table will be reallocated.
maskPtr,: the mask used to access the indices it will be read and written.
Precondition:
the size of the table is a power of 2 and size = mask + 1
Postcondition:
*tablePtr is deallocated (delete) and the new table is newly allocated (new).


Generated on Fri Jun 30 00:03:00 2006 for Module hash by  doxygen 1.4.2