27 static const int BINARY_HEAP_BLOCKSIZE;
29 static const int BINARY_HEAP_BLOCKSIZE_MASK;
31 void Init(uint max_size);
33 bool Push(
void *item,
int priority);
35 bool Delete(
void *item,
int priority);
36 void Clear(
bool free_values);
37 void Free(
bool free_values);
47 return this->elements[(i - 1) >> BINARY_HEAP_BLOCKSIZE_BITS][(i - 1) & BINARY_HEAP_BLOCKSIZE_MASK];
86 void *Get(uint key1, uint key2)
const;
87 void *Set(uint key1, uint key2,
void *value);
89 void *DeleteValue(uint key1, uint key2);
91 void Clear(
bool free_values);
92 void Delete(
bool free_values);
104 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.