#include "structs.h"
#include "mymemory.h"
-struct Set {
+class Set {
+ public:
+ Set(VarType t);
+ Set(VarType t, uint64_t *elements, uint num);
+ Set(VarType t, uint64_t lowrange, uint64_t highrange);
+ ~Set();
+ bool exists(uint64_t element);
+ uint getSize();
+ uint64_t getElement(uint index);
+
VarType type;
bool isRange;
uint64_t low;//also used to count unique items
uint64_t high;
- VectorInt * members;
+ Vector<uint64_t> *members;
+ MEMALLOC;
};
-
-Set *allocSet(VarType t, uint64_t * elements, uint num);
-Set * allocSetRange(VarType t, uint64_t lowrange, uint64_t highrange);
-uint getSetSize(Set* set);
-void deleteSet(Set *set);
#endif/* SET_H */