/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ #ifndef HASHTABLE_H__ #define HASHTABLE_H__ /*--------------------*/ #include "Element.h" typedef struct Node *List; struct Node { Element info; List next; }; typedef struct hashtable *Set; struct hashtable { unsigned int size; unsigned int card; List *table; }; /*--------------------*/ extern Set mkEmptySet(void); extern int isEmptySet(Set s); extern int isInSet(Element e, Set s); extern Set insertElem(Element e, Set s); extern Set removeElem(Element e, Set s); extern unsigned int card(Set s); extern int invSetAsHashtable(Set s); /*--------------------*/ #endif