+SimpleHash * SimpleHash::imageSet(int key) {
+ SimpleHash * newset=new SimpleHash(count(key));
+ unsigned int hashkey = (unsigned int)key % size;
+
+ struct SimpleNode *ptr = bucket[hashkey];
+ while (ptr) {
+ if (ptr->key == key) {
+ newset->add(ptr->data,ptr->data);
+ }
+ ptr = ptr->next;
+ }
+ return newset;
+}
+