[gecode-users] ViewArray <-> VarArgArray

Lars Otten ottenl at student.chalmers.se
Wed Jan 18 02:41:24 CET 2006


On 01/16/06 15:53, Guido Tack wrote:
> However, you can easily create your own IntVarArgs. 
> Suppose x is an IntView array:
> 
> IntVarArgs xa(size);
> for (int i=size; i--; ) {
>    IntVar v(x[i]);
>    xa[i] = v;
> }

Just a minor point: Is there any reason why you did not just write
  xa[i] = x[i];
as the body of the for loop, but instead took the 'detour' via the explicit
IntVar?

Am I right in assuming that for every element propagator instance I want to
post I have to create a distinct IdxView<View,View>* instance? I tried using
the same instance for two propagator instances but then it segfaulted on me...

Also, is there a theoretical bound on the number of propagators one can post
/ that can be present in a computation space at any given time (not
considering the limitedness of the computer's memory)? If yes, can one
predict what happens if this bound is exceeded?

Enough for today, it's really time to go to bed I guess... ;)

Cheers,
/Lars




More information about the gecode-users mailing list