/home66/gary/public_html/cloudy/c10_branch/source/hash.cpp File Reference

#include "cddefines.h"
#include "hash.h"
Include dependency graph for hash.cpp:

Go to the source code of this file.

Enumerations

enum  { HASHINIT = 5381, HASHMUL = 33 }

Functions

STATIC unsigned long hashfunction (const void *t, const size_t len)
STATIC entrylookup_key (const void *key, size_t *lkey, const hashtab *table, unsigned long *hk)
STATIC void extend (hashtab *table)
STATIC unsigned long getbin (unsigned long hk, const hashtab *table)
hashtabnewhash (void(*freedata)(void *))
void freehash (hashtab *table)
data_uaddentry (const void *key, size_t lkey, hashtab *table, int *exists)
data_ulookup (const void *key, size_t lkey, const hashtab *table)
int maxchain (const hashtab *table)
unsigned long makelist (const hashtab *table, data_u **list, const unsigned long nlist, int(*maskfun)(data_u *dat))
unsigned long makeplist (const hashtab *table, void **list, const unsigned long nlist, int(*maskfun)(data_u *dat))

Enumeration Type Documentation

anonymous enum
Enumerator:
HASHINIT 
HASHMUL 

Definition at line 147 of file hash.cpp.


Function Documentation

data_u* addentry ( const void *  key,
size_t  lkey,
hashtab table,
int *  exists 
)

Definition at line 74 of file hash.cpp.

References entry::data, DEBUG_ENTRY, extend(), getbin(), entry::hashval, data_u::key, data_u::lkey, lookup_key(), MALLOC, hashtab::nelem, entry::next, and hashtab::tab.

Referenced by newelement(), newreact(), and newspecies().

Here is the call graph for this function:

STATIC void extend ( hashtab table  ) 
void freehash ( hashtab table  ) 
STATIC unsigned long getbin ( unsigned long  hk,
const hashtab table 
)

Definition at line 234 of file hash.cpp.

References DEBUG_ENTRY, hashtab::frontmask, hashtab::fullmask, and hashtab::size.

Referenced by addentry(), and lookup_key().

STATIC unsigned long hashfunction ( const void *  t,
const size_t  len 
)

Definition at line 149 of file hash.cpp.

References DEBUG_ENTRY, HASHINIT, and HASHMUL.

Referenced by newhash().

data_u* lookup ( const void *  key,
size_t  lkey,
const hashtab table 
)

Definition at line 108 of file hash.cpp.

References entry::data, lookup_key(), and hashtab::nelem.

Referenced by CO_findrate_s(), findelement(), and findspecies().

Here is the call graph for this function:

STATIC entry * lookup_key ( const void *  key,
size_t *  lkey,
const hashtab table,
unsigned long *  hk 
)

Definition at line 163 of file hash.cpp.

References entry::data, DEBUG_ENTRY, getbin(), hashtab::hashfunction, entry::hashval, data_u::key, data_u::lkey, entry::next, and hashtab::tab.

Referenced by addentry(), and lookup().

Here is the call graph for this function:

unsigned long makelist ( const hashtab table,
data_u **  list,
const unsigned long  nlist,
int(*)(data_u *dat)  maskfun 
)

Definition at line 248 of file hash.cpp.

References cdEXIT, entry::data, DEBUG_ENTRY, ioQQQ, entry::next, hashtab::size, and hashtab::tab.

unsigned long makeplist ( const hashtab table,
void **  list,
const unsigned long  nlist,
int(*)(data_u *dat)  maskfun 
)

Definition at line 272 of file hash.cpp.

References cdEXIT, entry::data, DEBUG_ENTRY, ioQQQ, entry::next, data_u::p, hashtab::size, and hashtab::tab.

Referenced by CO_create_react(), and CO_Init().

int maxchain ( const hashtab table  ) 

Definition at line 121 of file hash.cpp.

References DEBUG_ENTRY, max(), entry::next, hashtab::size, and hashtab::tab.

Here is the call graph for this function:

hashtab* newhash ( void(*)(void *)  freedata  ) 

Definition at line 28 of file hash.cpp.

References DEBUG_ENTRY, hashfunction(), and MALLOC.

Referenced by CO_Init().

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1