21 htable->
harray = gk_ikvmalloc(nelements,
"HTable_Create: harray");
52 old_harray = htable->
harray;
57 htable->
harray = gk_ikvmalloc(nelements,
"HTable_Resize: harray");
58 for (i=0; i<nelements; i++)
62 for (i=0; i<old_nelements; i++)
92 for (i=0; i<
first; i++) {
113 for (i=first; i<htable->
nelements; i++) {
114 if (htable->
harray[i].key == key) {
121 for (i=0; i<
first; i++) {
122 if (htable->
harray[i].key == key) {
141 for (i=first; i<htable->
nelements; i++) {
142 if (htable->
harray[i].key == key)
148 for (i=0; i<
first; i++) {
149 if (htable->
harray[i].key == key)
171 for (i=first; i<htable->
nelements; i++) {
172 if (htable->
harray[i].key == key) {
173 *r_val = htable->
harray[
i].val;
183 for (i=first; i<
last; i++) {
184 if (htable->
harray[i].key == key) {
185 *r_val = htable->
harray[
i].val;
206 for (i=first; i<htable->
nelements; i++) {
207 if (htable->
harray[i].key == key) {
216 for (i=0; i<
first; i++) {
217 if (htable->
harray[i].key == key) {
246 return (
int)(key%nelements);
int HTable_GetNext(gk_HTable_t *htable, int key, int *r_val, int type)
constexpr int last(int, int result)
for(size_t i=1;i< poses.size();++i)
void HTable_Resize(gk_HTable_t *htable, int nelements)
gk_HTable_t * HTable_Create(int nelements)
void gk_errexit(int signum, char *f_str,...)
void HTable_Delete(gk_HTable_t *htable, int key)
void HTable_Insert(gk_HTable_t *htable, int key, int val)
constexpr int first(int i)
Implementation details for constexpr functions.
int HTable_SearchAndDelete(gk_HTable_t *htable, int key)
void HTable_Reset(gk_HTable_t *htable)
void * gk_malloc(size_t nbytes, char *msg)
void gk_free(void **ptr1,...)
int HTable_Search(gk_HTable_t *htable, int key)
void HTable_Destroy(gk_HTable_t *htable)
int HTable_HFunction(int nelements, int key)