Hi Christian,
Thanks for your help. I have now written the initial version of code
that allow IntActivity to be used in the variable selection predicate of
gfd. I have one question on what needs to be done during cloning, as you
mentioned that update needs to be caled:
On 17/02/2015 08:51, Christian Schulte wrote:
Yes, that looks okay. You have to call update() on the activity object when
you clone a space.
In my space class (GecodeSpace), the activity object, if it exist, is
pointed to by an actp filed:
IntActivity* actp;
which is NULL otherwise.
In my space constructor used for cloning, the activity object is
constructed using the copy constructor:
GecodeSpace(bool share, GecodeSpace& s) : ....
if (s.actp != NULL) {
actp = new IntActivity(*(s.actp));
do I still need to call update in this case, i.e. something like:
actp->update(*this, share, *(s.actp));
or does the copy constructor already does the copying needed?
Thanks and cheers,
Kish
_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users