Hi, The best of all explanations: simplicity (and hence efficiency). No datastructure in Gecode stores its home space, instead all operations that might need a space get it passed as argument. Variables, propagators, etc, still belong to its single home space, however they just do not store the space information. This leads to much stricter invariants (compared to the Mozart design to store the home space everywhere) and hence less bugs.
And the reason why pretty all operations need a space is for (that is, at least) memory management: remember, memory is managed per space. That in particular includes operations that modify variable domains either directly or indirectly. Cheers Christian -- Christian Schulte, www.ict.kth.se/~schulte/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Filip Konvicka Sent: Friday, August 31, 2007 10:38 AM To: [EMAIL PROTECTED] Subject: [gecode-users] branchings methods Space* arguments Hi, my new propagators run just fine :-) Now I wanted to do create a branching, and I don't understand why status(), descrption() and commit() take the "Space *home" parameter. I thought that a branching is bound to "its" space in the constructor, and that it would always operate on that space. I also thought that it would, in the constructor or in the post() function, create some views of some variables in the space, and operate on them instead of accessing the space directly. In fact, the same holds for propagators as well. Can you explain, please? Thanks, Filip _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
