Javier Andrés Mena Zapata wrote:
I wonder which is the objective of the update and copy methods. My
question arise, because the intermediate variables doesn't need to
be update.
That's right. You only need to copy those variables that you want to
access in order to e.g. print a solution.
Copying works in two steps: first all propagators copy the variables
that they depend upon, and after that the "user" variables are
copied. That means that if no propagator depends on some variable x
any more, but you need x to print the solution, you have to copy x
(in the copy function). If x is an intermediate variable and you
don't need it for the solution, you don't have to copy it, and it
will be automatically "garbage collected".
Note that variables are not actually copied every time you call their
update function. Only at most one copy will be made, no matter how
many propagators copy the variable and no matter whether you update
it again in the copy function of your space subclass.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users