On Feb 12, 2008 6:53 AM, Malcolm Ryan <[EMAIL PROTECTED]> wrote: > In Gecode/J: > > If I have a Space which contains some variables and a Branching which > contains views of those variable, what happens when I copy them? Do > they end up pointing to the 'same' copies? How?
They absolutely end up pointing to the same variable, otherwise the semantics would differ between the original space and the copy. Behind the scenes, both an IntVar and an IntView (for example) contain a pointer to the real variable. During the copying procedure, this real variable is copied only once, and a forwarding pointer is recorded so that all instances of IntVars and IntViews pointing to this variable can follow the forwarding pointer. Cheers, Mikael -- Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/ _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users