29 static const int BINARY_HEAP_BLOCKSIZE;
31 static const int BINARY_HEAP_BLOCKSIZE_MASK;
33 void Init(uint max_size);
35 bool Push(
void *item,
int priority);
37 bool Delete(
void *item,
int priority);
38 void Clear(
bool free_values);
39 void Free(
bool free_values);
49 return this->elements[(i - 1) >> BINARY_HEAP_BLOCKSIZE_BITS][(i - 1) & BINARY_HEAP_BLOCKSIZE_MASK];
88 void *Get(uint key1, uint key2)
const;
89 void *Set(uint key1, uint key2,
void *value);
91 void *DeleteValue(uint key1, uint key2);
93 void Clear(
bool free_values);
94 void Delete(
bool free_values);
106 void PrintStatistics()
const;
BinaryHeapNode & GetElement(uint i)
Get an element from the #elements.
uint GetSize() const
Gets the current size of the hash.
uint blocks
The amount of blocks for which space is reserved in elements.
uint Hash_HashProc(uint key1, uint key2)
Generates a hash code from the given key pair.
static const int BINARY_HEAP_BLOCKSIZE_BITS
The number of elements that will be malloc'd at a time.