Chris Mears wrote: > I can check if two IntViews are ground and equal like this: > > IntView &x = ... > IntView &y = ... > if (x.assigned() && y.assigned() && x.val() == y.val()) > ... > > Can I do the same thing for sets? There doesn't seem to be an > equivalent to "val()" in the SetView class.
You'll have to use iterators: GlbRanges<SetView> xr(x); GlbRanges<SetView> yr(y); if (x.assigned() && y.assigned() && Iter::Ranges::equal(xr,yr)) ... If this test is done very often and the sets are usually not equal, you can check the cardinalities first in order to speed things up a bit: if (x.assigned() && y.assigned() && x.cardMin()==y.cardMin() && Iter::Ranges::equal(xr,yr)) ... Cheers, Guido _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users