[gecode-users] Only showing solutions without ".."

Guido Tack tack at ps.uni-sb.de
Fri Feb 29 18:10:10 CET 2008


Mauricio Toro wrote:

> Hello,
>
> I would like to know.
> How can I tell gecode, when using sets,
> that show me only the solutions not
> containing ".."
>
>
> For example, I would like to see
> solutions such as: {0,4,6,7,9,11}#(6) or new polygon{0,4,6,7,9,10}#(6)
> But I do not want to see this kind of solutions:
> new polygon{0,4,7..10}#(6)
> new polygon{0,4,7..9,11}#(6)
> new polygon{0,4,7,8,10,11}#(6)
> new polygon{0,4,7,9..11}#(6)

The set {0,4,7..10}#(6) actually means {0,4,7,8,9,10}, Gecode always  
outputs continuous intervals using .. notation.  If you want to have  
individual values, you can e.g. use a GlbValues iterator on a SetVar.

Cheers,
	Guido

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080229/3659186f/attachment.bin>


More information about the gecode-users mailing list