}
andarray[andi++]=new Constraint(OR, ori, orarray);
- value=value+(1<<(__builtin_ctz(value))); //flip the last one
+ value=value+(1<<(__builtin_ctz(value)));
+ //flip the last one
}
}
#include "ops.h"
class CSolver {
+public:
+ CSolver();
+
Set * createSet(Type type, uint64_t ** elements);
Set * createSet(Type type, uint64_t lowrange, uint64_t highrange);
MutableSet * createMutableSet(Type type);
Constraint * getBooleanVar();
Function * createFunctionOperator(enum ArithOp op, Set ** domain, Set * range, enum OverFlowBehavior overflowbehavior, Constraint * overflowstatus);
- Function * createFunctionOperator(enum ArithOp op); //Does Not Overflow
+ Function * createFunctionOperator(enum ArithOp op); //Does Not Overflow
Predicate * createPredicateOperator(enum CompOp op, Set ** domain);
Table * createTable(Set **domains, Set * range);
Order * createOrder(enum OrderType type, Set * set);
Constraint * orderedConstraint(Order * order, uint64_t first, uint64_t second);
+private:
+
};
#endif
#include "mymemory.h"
class Element {
- public:
+public:
Element(Set *s);
MEMALLOC;
- private:
+private:
Set *set;
};
#endif
#include "classlist.h"
#include "mymemory.h"
class Function {
- public:
-
+public:
+
MEMALLOC;
- private:
+private:
};
#endif
capacitymask = initialcapacity - 1;
threshold = (unsigned int)(initialcapacity * loadfactor);
- size = 0; // Initial number of elements in the hash
+ // Initial number of elements in the hash
+ size = 0;
}
/** @brief Hash table destructor */
exit(EXIT_FAILURE);
}
- table = newtable; // Update the global hashtable upon resize()
+ table = newtable;
+ // Update the global hashtable upon resize()
capacity = newsize;
capacitymask = newsize - 1;
search->val = bin->val;
}
- _free(oldtable); // Free the memory of the old hash table
+ _free(oldtable);
+ // Free the memory of the old hash table
}
double getLoadFactor() {return loadfactor;}
unsigned int getCapacity() {return capacity;}
void operator delete[](void *p, size_t size) { \
model_free(p); \
} \
- void * operator new(size_t size, void *p) { /* placement new */ \
+ void * operator new(size_t size, void *p) { /* placement new */ \
return p; \
}
#include "mymemory.h"
class Order {
- public:
+public:
MEMALLOC;
-
- private:
+
+private:
};
#endif
#include "mymemory.h"
class Predicate {
- public:
+public:
MEMALLOC;
- private:
+private:
};
#endif
#include "mymemory.h"
class Table {
- public:
+public:
MEMALLOC;
- private:
+private:
};
#endif