[gecode-users] IntVar class container as parameter for branchers
Christian Schulte
cschulte at kth.se
Tue Apr 23 15:33:43 CEST 2013
Hi Christine,
If the data structure is small then you do not have to share it by use of a
LocalHandle. If it is maybe not so small then the use of LocalHandle might
be useful.
I personally always use LocalHandle when I can use it (that is, I have a
data structure shared between several entities in a space).
Best
Christian
--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of christine bouzant
Sent: Tuesday, April 23, 2013 3:10 PM
To: users at gecode.org
Subject: [gecode-users] IntVar class container as parameter for branchers
Hello all,
In my script class, i have an array of CarDeparture pointer objects which
class contains several IntVar variables and some data information.
Inside the script copy constructor, i create a copy of the array of
CarDeparture objects using a CarDeparture copy constructor which updates
each of its IntVar variables and data.
I am thinking to set a CarDeparture object as a parameter for a brancher.
So, i should again do a copy of this object inside the brancher copy
constructor.
According to you, is it judicious to proceed like this concerning
performance ?
Or maybe, can i make the CarDeparture class inherit of LocalHandle (in order
to be space dependant ?).
Thank you all.
Cheers,
Christine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130423/c30b0cd5/attachment.html>
More information about the users
mailing list