[gecode-users] How to post : distinct ( of absolute value of values) constraint ?

Bouchene Sabrina genius_linda1987 at yahoo.fr
Thu Oct 23 00:55:56 CEST 2014


Hi,I want to use "alldifferent" constraint or a "distinct" constraint but in my case, i have a matrix M and i would that the elements (values) of the row of a matrix be different, but the variables of the row can have positive and negative values, so i would have a constraint that for example: if row = 1 then the absolute values of M[1, j] could be all different, that means, if i have M[1,1]=(-3), i should not get M[1,j] =(+3) for j =1 to n.
alldifferent (|M[i, j]|).
My question is how to write this constraint in Gecode ?.Best regards. Sabrina 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20141022/80fd431d/attachment.html>


More information about the users mailing list