Xiqual 0.9.1

In file include/hash.h:

typedef struct HashTable

Non-resizing hash table.

[more]ulong size
Number of buckets.
[more]ulong load
Maximum number of elements per bucket.
[more]ulong count
Number of elements right now
[more]ulong nodesize
Size of nodes.
[more]struct HashNode **buckets
The actual hash array



Documentation

Non-resizing hash table. Better make sure you allocate enough space for all the data you need, or use the forthcoming extension called "hash carousels".
oulong size
Number of buckets. A bucket holds approximately the number of nodes specified by load on creation. This is not a real guarantee, though, as the hashing algorithm can't guarantee complete useless in hashes.

oulong load
Maximum number of elements per bucket. When the average elements per bucket reaches this number, the hash table is definitely full.

The current implementation refuses to add nodes beyond this point.

oulong count
Number of elements right now

oulong nodesize
Size of nodes. This allows you to have custom nodes - the only requirement is that the first fields are the same as the HashNode structure.

ostruct HashNode **buckets
The actual hash array Each bucket is a pointer to one or more hash nodes. Specify load to set an approximate maximum.
See Also:
hash_new(), HashNode

Alphabetic index



This page was generated with the help of DOC++.