return low + index;
else
return members->get(index);
-}
+ }
uint Set::getSize() {
if (isRange) {
}
bool generateNegation = constraint->encoding.type == ENUMERATEIMPLICATIONSNEGATE;
uint numDomains = predicate->table->numDomains();
-
+ ASSERT(numDomains != 0);
VectorEdge *clauses = allocDefVectorEdge();
uint indices[numDomains]; //setup indices
switch (function->undefBehavior) {
case SATC_UNDEFINEDSETSFLAG: {
if (isInRange) {
- //FIXME: Talk to Brian, It should be IFF not only IMPLY. --HG
clause = constraintIMPLIES(cnf, constraintAND(cnf, numDomains, carray), carray[numDomains]);
} else {
addConstraintCNF(cnf, constraintIMPLIES(cnf, constraintAND(cnf, numDomains, carray), undefConstraint));
return set;
}
+bool CSolver::itemExistInSet(Set *set, uint64_t item){
+ return set->exists(item);
+}
+
VarType CSolver::getSetVarType(Set *set) {
return set->getType();
}
/** This function creates a set from lowrange to highrange (inclusive). */
Set *createRangeSet(VarType type, uint64_t lowrange, uint64_t highrange);
+
+ bool itemExistInSet(Set *set, uint64_t item);
VarType getSetVarType(Set *set);
Element *createRangeVar(VarType type, uint64_t lowrange, uint64_t highrange);
- /** This function creates a mutable set. */
+ /** This function creates a mutable set.
+ * Note: You should use addItem for adding new item to Mutable sets, and
+ * at the end, you should call finalizeMutableSet!
+ */
MutableSet *createMutableSet(VarType type);