[gecode-users] Getting domain values after posting
Grégoire Dooms
dooms at info.ucl.ac.be
Tue Mar 28 20:15:19 CEST 2006
> Also how can I get all the valid values of the domain of a
> variable after posting? I assume this can be done by using iterators but I
> am not certain how exactly to relate the iterator with the IntVar or the
> IntSet that represents the variable, so any enlightening on that, would be
> highly appreciated.
>
Look at IntVarRanges, it is an iterator over the ranges of the domain of
your intvar.
http://www.gecode.org/gecode-doc-latest/classGecode_1_1IntVarRanges.html
You can use IntVarValues if you want an iterator over the values in the
domain.
HTH,
--
Grégoire Dooms
More information about the gecode-users
mailing list