El domingo, 3 de febrero de 2013 a las 9:47, miavisa escribió:

> In vm/main/space-decl.hh:
> > @@ -346,6 +346,10 @@ public: > bool hasConstraintSpace() { > return _cstSpace != nullptr; > } > + > + void setCstSpace(GecodeSpace cstSpace) {  
> This is because in DFS builtin the output should be a Space, but the output of the search engine is a GecodeSpace, then i need create a new Space and assign the GecodeSpace obtained in the search engine.
>  
>  
>  
>  
>  


That is the work of Space.merge and the behavior should be encapsulated there. I would go for a constructor that takes a gecode space and do everything inside. Having such method is kind of problematic because it can be used for other purposes not part of the design.

Think about the following: the life time of any gecode space depends on a mozart space. By  providing such a method you can alter that behavior and end up replacing gecode spaces which is something we want to prevent by design.