[gecode-users] Space and variables cloning

Guido Tack tack at ps.uni-sb.de
Tue Mar 28 21:03:28 CEST 2006


Hi.

> OK. I saw this copy method, however I thought it existed only
> for internal purposes. If I understand well, I only need to
> write :
>
> qs2 = static_cast<QSpace> (qs->clone(false))
>
> Am I right on this point ? (I tested it and it seems to work
> so far, but I prefer asking for confirmation...)

I guess it might have to be static_cast<QSpace *> (qs->clone(false)), but
apart from that that's exactly how it works. You may want to call
clone(true) (or just clone()) - the argument "false" means that shareable
datastructures are not shared, which is mainly needed in a multi-threaded
environment.

Cheers,
   Guido

-- 
Guido Tack
http://www.ps.uni-sb.de/~tack






More information about the gecode-users mailing list