rbs.hh gecode/search.hh /usr/include/gecode/search/rbs.hpp Gecode::Search::Meta::RBS Gecode Gecode::Search Gecode::Search::Meta /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *GuidoTack<tack@gecode.org> * *Copyright: *GuidoTack,2012 * *Lastmodified: *$Date:2013-07-1112:30:18+0200(Thu,11Jul2013)$by$Author:schulte$ *$Revision:13840$ * *ThisfileispartofGecode,thegenericconstraint *developmentenvironment: *http://www.gecode.org * *Permissionisherebygranted,freeofcharge,toanypersonobtaining *acopyofthissoftwareandassociateddocumentationfiles(the *"Software"),todealintheSoftwarewithoutrestriction,including *withoutlimitationtherightstouse,copy,modify,merge,publish, *distribute,sublicense,and/orsellcopiesoftheSoftware,andto *permitpersonstowhomtheSoftwareisfurnishedtodoso,subjectto *thefollowingconditions: * *Theabovecopyrightnoticeandthispermissionnoticeshallbe *includedinallcopiesorsubstantialportionsoftheSoftware. * *THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND, *EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOF *MERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEAND *NONINFRINGEMENT.INNOEVENTSHALLTHEAUTHORSORCOPYRIGHTHOLDERSBE *LIABLEFORANYCLAIM,DAMAGESOROTHERLIABILITY,WHETHERINANACTION *OFCONTRACT,TORTOROTHERWISE,ARISINGFROM,OUTOFORINCONNECTION *WITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE. * */ #ifndef__GECODE_SEARCH_META_RBS_HH__ #define__GECODE_SEARCH_META_RBS_HH__ #include<gecode/search.hh> namespaceGecode{namespaceSearch{namespaceMeta{ classRBS:publicEngine{ private: Engine*e; Space*master; Cutoff*co; MetaStop*stop; boolshared; GECODE_SEARCH_EXPORT staticNoGoodseng; public: RBS(Space*s,Cutoff*co0,MetaStop*stop0, Engine*e0,constOptions&o); virtualSpace*next(void); virtualSearch::Statisticsstatistics(void)const; virtualboolstopped(void)const; virtualvoidreset(Space*s); virtualNoGoods&nogoods(void); virtual~RBS(void); }; forceinline RBS::RBS(Space*s,Cutoff*co0,MetaStop*stop0, Engine*e0,constOptions&opt) :e(e0),master(s),co(co0),stop(stop0), shared(opt.threads==1){ stop->limit(Statistics(),(*co)()); } }}} #endif //STATISTICS:search-other