[gecode-users] "anti-"dom constraint

Christian Schulte cschulte at kth.se
Fri Aug 31 17:06:56 CEST 2007


Yes, Christian


--
Christian Schulte, www.ict.kth.se/~schulte/ 
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Jérémie Vautard
Sent: Friday, August 31, 2007 3:54 PM
To: users at gecode.org
Subject: [gecode-users] "anti-"dom constraint


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





More information about the gecode-users mailing list