[gecode-users] Help to express a constraint
Christian Schulte
cschulte at kth.se
Thu Jun 5 16:20:17 CEST 2014
Hi Philippe,
Both are not possible due to restrictions in C++...
Cheers
Christian
--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Philippe
Sent: Wednesday, June 04, 2014 8:12 PM
To: users at gecode.org
Subject: Re: [gecode-users] Help to express a constraint
Sorry for the wrong form i've provided.
Here is an example of what i wanted to express :
1) Given the fact that Status and Succ are matrix interfaces of
two IntVarArray and t, m are integers, the expression :
expr(*this, Status(Succ(t,m), m) != 3); // don't compile
is more "elegant" than :
expr(*this, element(Status.row(m), Succ(t,m)) != 3)
But it seems difficult to implement the first one.
2) I have another exemple in mind :
expr(*this, Succ(t,m) != t); // don't compile
For now, one have to write this to compile :
IntVar T(*this, t, t);
expr(*this, Succ(t,m) != T);
Anyway, it's just syntaxic sugar... sorry to bother you with these remarks.
Best,
Philippe
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list