Skip to content

Commit

Permalink
Implement unary extensional constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
pothitos committed May 27, 2017
1 parent 537ea71 commit c3a4c02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/XCSP3/translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,14 @@ void Xcsp3_to_Naxos::buildConstraintPrimitive(string id, OrderType op,
/// Materializes the unary extensional constraint
void Xcsp3_to_Naxos::addUnaryExtensionConstraint(XVariable* var, bool support)
{
// TODO
NsIntVar& Var = variable(var->id);
NsDeque<NsInt>& tuple = tuplesStore.back().back();
if (support) {
removeUnsupportedValues(Var, tuple);
} else {
for (auto val : tuple)
Var.remove(val);
}
}

/// Materializes the extensional constraint
Expand Down

0 comments on commit c3a4c02

Please sign in to comment.