Hi Kish, My bad... There is really no common basetype for search engines, the type I mentioned is actually for the implementations and not the interfaces...
I think you will have to wait until I have added a common basetype (there is a basetype, but it is not powerful enough), I might be able to do it until the end of the week. Sorry for the confusion! Cheers Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ -----Original Message----- From: Kish Shen [mailto:kiss...@cisco.com] Sent: Thursday, August 22, 2013 9:45 AM To: cschu...@kth.se Cc: users@gecode.org Subject: Re: [gecode-users] Adding restart-based search to ECLiPSe's interface to Gecode Hi Christian, Thanks again! On 21/08/2013 19:17, Christian Schulte wrote: > Try to avoid the Gecode::Search::bab .... functions. Just create as follows: > Gecode::Search::Engine* e = new Gecode::BAB(...) Then it also will > work for RBS, and you do not have to create a second engine yourself, > this will the RBS class do for you. > > And do not forget to delete e eventually! > This is the part that I don't know how to do correct -- probably because of my lack of C++ knowledge, but as far as I can tell, Gecode::DFS etc are not of class Engine*, according to the doc: template<class T> class Gecode::DFS<T> for subclasses T of Space T is GecodeSpace in my case, I assume. I am not sure what class DFS is, but I can't see how it could be Engine*. Anway, I tried to do the assignment as you suggested: Search::Engine* segine; ... sengine = new DFS<GecodeSpace>(solver, o); and indeed I get the error cannot convert 'Gecode::DFS<GecodeSpace>*' to 'Gecode::Search::Engine*' (I first tried sengine = new DFS(solver, o) but got an error 'expected type-specifier') So I am not sure what to do -- do I need to change the type of sengine, and/or the way I assign an engine to sengine? Cheers, Kish _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users