[gecode-users] "anti-"dom constraint
Jérémie Vautard
jeremie.vautard at laposte.net
Fri Aug 31 15:54:20 CEST 2007
Hi !
I ask here to be sure : I would like to post a constraint such that a
variable x is NOT in an IntSet s. Is it OK to simply mimic the
initial dom function :
dom(Space* home, IntVar x, const IntSet& is, IntConLevel) {
00049 if (home->failed()) return;
00050 IntView xv(x);
00051 IntSetRanges ris(is);
00052 GECODE_ME_FAIL(home,xv.inter(home,ris));
00053 }
just replacing "inter" by "minus" in the last line ?
Cheers,
Jeremie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20070831/030f28c0/attachment.htm>
More information about the gecode-users
mailing list