[gecode-users] Defining constraint to extract Element from an array of integer holding repeated values

Jeffrey jeffreym9 at yahoo.com.hk
Sat Jan 17 15:23:08 CET 2009


For constructing an IntSetArgs with instructorOfStudent[], below is the way I used.
It seems a bit stupid to put the instructorOfStudent[] into a tmpValue[1] in order to use the constructor.
Is there are smarter way to do so?
 
   IntSetArgs relValues(noOfStudents);
   int tmpValue[1];
   for(int j=0; j<noOfStudents; j++) {
     tmpValue[0] = instructorOfStudent[j];
     relValues[j] = IntSet(tmpValue, 1);
   }


      Yahoo!香港提供網上安全攻略,教你如何防範黑客! 請前往 http://hk.promo.yahoo.com/security/ 了解更多!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090117/068ffd81/attachment.htm>


More information about the gecode-users mailing list