[gecode-users] non empty rangelist with an empty range

Guido Tack tack at ps.uni-sb.de
Tue Dec 16 17:30:18 CET 2008


Denys Duchier wrote:

> I wrote:
>
>    SetVar s(this, 0, -1, 0, 10, 0, 11);
>
> because it seemed (I guess, by analogy with loops) a fairly natural  
> way
> to indicate an empty glb.  It turns out that Gecode will happily  
> create
> a range list containing the range [0,-1] which causes Gecode to behave
> strangely.
>
> I think that either the documentation should explicitely state the
> invariant or the code should check it.

Thanks, Denys.  We should definitely support the 0,-1 notation (we  
support it for IntSets, so SetVars should be no exception).  I fixed  
it in the trunk, and while I was looking at that code, I also found  
out that the SetVar constructors did not throw proper exceptions when  
trying to create an empty domain - it should all work as expected now.

Cheers,
	Guido





More information about the gecode-users mailing list