}
}
+void mustHaveValueConstraint(CSolver* solver, vector<Element*> &elems){
+ for(int i=0; i<elems.size(); i++){
+ solver->mustHaveValue(elems[i]);
+ }
+}
+
void differentInEachRow(CSolver* solver, int N, vector<Element*> &elems){
Predicate *eq = solver->createPredicateOperator(SATC_EQUALS);
for(int i=0; i<N-1; i++){
for(int i=0; i<N; i++){
elems.push_back(solver->getElementVar(domainSet));
}
-
+ mustHaveValueConstraint(solver, elems);
differentInEachRow(solver, N, elems);
diagonallyDifferentConstraintBothDir(solver, N, elems);
// solver->printConstraints();