[gecode-users] element constraint

frank lemoine benouna84 at live.fr
Fri Oct 30 16:48:19 CET 2009


hi every one,

 

i just begin in gecode, i use the element constraint for matching two sets, i read carefully "modeling with gecode" and i run this command: 

 

IntArgs cf(4,13,4,25,16,29,8);

for(int i=0;i<7;i++)

{

element(*this, cf, xb[i], yb[i]);

}  

 

xb and yb are IntVarArray (*this,8,0,30) i get this: {4,13,16,25} 7 times and the last is [0...30]

 

if i try with this set cf(3,13,4,25,16,29,8) i get {4,13,25} 7 times and the last is [0...30]

 

i haven't understand how this constraint work. can some one explain me ? 

 

what i want to do is: first set i have this {0,1,2,3,4,5} the second set containt a variable Intvar x with diffrent domain 0....10, 2..6, 4......44

 

i have to check if x is in the first set when x is egal to one of this domain.
 		 	   		  
_________________________________________________________________
Nouveau ! Tout Windows débarque dans votre téléphone. Voir les Windows phone
http://clk.atdmt.com/FRM/go/175819071/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20091030/7b076bce/attachment.htm>


More information about the gecode-users mailing list