[gecode-users] iterating/filtering IntView
Guido Tack
tack at ps.uni-sb.de
Tue May 15 07:39:25 CEST 2007
Kilian Sprotte wrote:
> It does not seem to be a good idea however to alter the view x1
> while iterating over it...(is it true that this should not be done/
> will cause problems?)
>
> Hhm, could anyone give me a hint, what I could use in order to do
> this safely?
Another option, which you could try more easily, is to wrap your
IntVarValues inside an Iter::Cache. The cache is filled when you
create it, so you can safely update the domain afterwards. However,
you should probably only use this for testing, as the problem with
the quadratic runtime remains.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list