4 Set * allocSet(VarType t, uint64_t* elements, uint num) {
5 Set * This=(Set *)ourmalloc(sizeof(Set));
10 This->members=allocVectorArrayInt(num, elements);
14 Set * allocSetRange(VarType t, uint64_t lowrange, uint64_t highrange) {
15 Set * This=(Set *)ourmalloc(sizeof(Set));
24 bool existsInSet(Set* This, uint64_t element){
26 return element >= This->low && element <= This->high;
28 uint size = getSizeVectorInt(This->members);
29 for(uint i=0; i< size; i++){
30 if(element == getVectorInt(This->members, i))
37 uint64_t getSetElement(Set * This, uint index) {
39 return This->low+index;
41 return getVectorInt(This->members, index);
44 uint getSetSize(Set* This){
46 return This->high - This->low+1;
48 return getSizeVectorInt(This->members);
52 void deleteSet(Set * This) {
54 deleteVectorInt(This->members);