00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef INTSET_H_
00010 #define INTSET_H_
00011
00017 class IntSet {
00018 public:
00019 IntSet();
00023 IntSet(int capacity);
00024 virtual ~IntSet();
00025
00030 int getSize();
00031
00037 bool insert(int x);
00038
00043 bool find(int x);
00044
00045 private:
00046 int size;
00047 int * table;
00048 bool * filled;
00049 int tableSize;
00050
00051 void init(int capacity);
00052 int hash_function(int x);
00053 int quadratic_probe(int i);
00054 void rehash(int capacity);
00055 };
00056
00057 #endif