14 using namespace shogun;
46 int32_t index = hash(key);
47 if(chain_search(index, key) != NULL)
54 HashSetNode* new_node =
new HashSetNode;
56 new_node->data = data;
57 new_node->left = NULL;
58 new_node->right = NULL;
78 int index = hash(key);
80 HashSetNode* result = chain_search(index, key);
87 ret_data = result->data;
92 HashSetNode* CHashSet::chain_search(int32_t index, int32_t key)
105 if(current->key == key)
110 current = current->right;
112 }
while(current != NULL);
120 int index = hash(key);
121 HashSetNode* result = chain_search(index, key);
128 if(result->right != NULL)
130 result->right->left = result->left;
133 if(result->left != NULL)
135 result->left->right = result->right;
143 result->right = NULL;
163 current = current->right;
165 while(current != NULL);
170 int32_t CHashSet::hash(int32_t key)