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


_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to