[gecode-users] Sets difference
Mauricio Toro
mauriciotorob at gmail.com
Fri Feb 29 12:18:43 CET 2008
Hello,
I am trying to make a little program for set's difference.
I found some info at sudoko's example.. but I have not
been able to make the difference work :(
I have this code:
SetVar a = SetVar(this);
SetVar b = SetVar(this);
SetVar c = SetVar(this);
SetVarArray answer = SetVarArray(this,2);
dom (this, a, SRT_EQ , 1, 5);
dom (this, b, SRT_EQ , 3, 10);
//c = a - b
// answer = c ??
rel (this, a, SOT_MINUS, b, SRT_EQ, c);
rel (this, SOT_UNION, answer, c);
//SET_VAR_MIN_CARD With smallest unknown set.
//SET_VAL_MIN Select smallest value in unknown set
branch(this, answer, SET_VAR_NONE, SET_VAL_MIN);
--
Mauricio Toro Bermudez
Estudiante de Ingeniería de Sistemas
Pontificia Universidad Javeriana, Colombia
Stagiare à l'Ircam
1, place Igor-Stravinsky 75004 Paris,
France de 2008 à 2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080229/e013d98e/attachment.htm>
More information about the gecode-users
mailing list