21 #ifndef ABC__misc__hash__hashFlt_h
22 #define ABC__misc__hash__hashFlt_h
69 #define Hash_FltForEachEntry( pHash, pEntry, bin) \
70 for(bin=-1, pEntry=NULL; bin < pHash->nBins; (!pEntry)?(pEntry=pHash->pArray[++bin]):(pEntry=pEntry->pNext)) \
98 for(i=0; i<nBins; i++)
124 pLast = &(p->
pArray[bin]);
127 if (pEntry->
key == key) {
130 pLast = &(pEntry->
pNext);
131 pEntry = pEntry->
pNext;
157 pLast = &(p->
pArray[bin]);
160 if (pEntry->
key == key) {
164 pLast = &(pEntry->
pNext);
165 pEntry = pEntry->
pNext;
172 pEntry->
pNext = NULL;
200 pLast = &(p->
pArray[bin]);
203 if (pEntry->
key == key)
205 pLast = &(pEntry->
pNext);
206 pEntry = pEntry->
pNext;
214 pEntry->
pNext = NULL;
244 pLast = &(p->
pArray[bin]);
247 if (pEntry->
key == key)
248 return &(pEntry->
data);
249 pLast = &(pEntry->
pNext);
250 pEntry = pEntry->
pNext;
257 pEntry->
pNext = NULL;
261 return &(pEntry->
data);
284 pLast = &(p->
pArray[bin]);
287 if (pEntry->
key == key) {
289 *pLast = pEntry->
pNext;
293 pLast = &(pEntry->
pNext);
294 pEntry = pEntry->
pNext;
317 for(bin = 0; bin < p->
nBins; bin++) {
321 pEntry = pEntry->
pNext;
ABC_NAMESPACE_HEADER_START int Hash_DefaultHashFunc(int key, int nBins)
INCLUDES ///.
struct Hash_Flt_Entry_t_ * pNext
static void Hash_FltWriteEntry(Hash_Flt_t *p, int key, float data)
static float Hash_FltEntry(Hash_Flt_t *p, int key, int fCreate)
static float * Hash_FltEntryPtr(Hash_Flt_t *p, int key)
static void Hash_FltFree(Hash_Flt_t *p)
#define ABC_ALLOC(type, num)
static Hash_Flt_t * Hash_FltAlloc(int nBins)
FUNCTION DEFINITIONS ///.
static void Hash_FltRemove(Hash_Flt_t *p, int key)
static int Hash_FltExists(Hash_Flt_t *p, int key)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
#define ABC_NAMESPACE_HEADER_END
int(* fHash)(int key, int nBins)
Hash_Flt_Entry_t ** pArray