[gecode-users] How to iterate over a integer view's domain

Guido Tack tack at ps.uni-sb.de
Fri Apr 4 12:59:21 CEST 2008


Debdeep Banerjee wrote:
> I want to iterate over the current domain of a integer view
> (Gecode::Int::IntView). How can I do that ? Is this domain current ?
> I want to implement my own variable and value selection. That's why I
> need to access the current domain of the variable. Is there any good  
> way
> to do it ?

Yes, using ViewRanges<IntView>:
http://www.gecode.org/gecode-doc-latest/classGecode_1_1Int_1_1ViewRanges.html

What do you mean by current?  The domain of a variable is always  
current, in the sense that if it's modified, iteration over the domain  
will reflect the modification.

Cheers,
	Guido




More information about the gecode-users mailing list