[Gecode] Propgator copy

Gustavo Gutierrez ggutierrez at atlas.puj.edu.co
Wed Feb 9 18:01:21 CET 2005


Hi,

First of all congratulations, GECODE is a really good piece of software! it is
very useful and really *easily* extensible. Source code is very clear, at
least the parts i've read.

I have a question about propagators. I am writing a propagator, for instance
Prop, which needs to maintain a binary tree with some information and a
variable vector (VarArray). This propagator inherits from NaryPropagator. Is
there any special issue with this tree structure i need to take into account? 

The tree is used only by the propagate method and  it doesn't change its
structure along propagation. I have some doubts implementing two methods:

Prop(Space* home, Prop<Var>& p);

Call the super class NaryPropagator method to do this is not enough, what
would happened with the tree?

Actor* copy(Space* home, bool);
This method call the constructor i mentioned before, so i think all depends on
that implementation.

Finally, i think the memory allocated by the tree must be freed only at
propagator destructor method.


Thanks in advance and hope to be clear. Feel free to ask for more details.

Gustavo Gutierrez



More information about the gecode-users mailing list