member.hh gecode/int.hh gecode/int/val-set.hh gecode/int/member/prop.hpp gecode/int/member/re-prop.hpp Gecode::Int::Member::Prop Gecode::Int::Member::ReProp Gecode::Int::Member Gecode Gecode::Int /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *ChristianSchulte<schulte@gecode.org> * *Copyright: *ChristianSchulte,2011 * *Lastmodified: *$Date:2011-11-1816:02:48+0100(Fri,18Nov2011)$by$Author:schulte$ *$Revision:12472$ * *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_INT_MEMBER_HH__ #define__GECODE_INT_MEMBER_HH__ #include<gecode/int.hh> #include<gecode/int/val-set.hh> namespaceGecode{namespaceInt{namespaceMember{ template<classView> classProp:publicNaryOnePropagator<View,PC_INT_DOM>{ protected: usingNaryOnePropagator<View,PC_INT_DOM>::x; usingNaryOnePropagator<View,PC_INT_DOM>::y; ValSetvs; staticvoidadd(Space&home,ValSet&vs,ViewArray<View>&x); voideliminate(Space&home); Prop(Homehome,ValSet&vs,ViewArray<View>&x,Viewy); Prop(Space&home,boolshare,Prop<View>&p); public: virtualPropCostcost(constSpace&,constModEventDelta&med)const; virtualPropagator*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<View>&x,Viewy); staticExecStatuspost(Homehome,ValSet&vs,ViewArray<View>&x,Viewy); virtualsize_tdispose(Space&home); }; template<classView,ReifyModerm> classReProp:publicProp<View>{ protected: usingProp<View>::x; usingProp<View>::y; usingProp<View>::vs; usingProp<View>::add; usingProp<View>::eliminate; BoolViewb; ReProp(Homehome,ValSet&vs,ViewArray<View>&x,Viewy,BoolViewb); ReProp(Space&home,boolshare,ReProp<View,rm>&p); public: virtualPropagator*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<View>&x,Viewy,BoolViewb); virtualsize_tdispose(Space&home); }; }}} #include<gecode/int/member/prop.hpp> #include<gecode/int/member/re-prop.hpp> #endif //STATISTICS:int-prop