sequence.hh gecode/int.hh gecode/int/rel.hh gecode/int/sequence/set-op.hpp gecode/int/sequence/violations.hpp gecode/int/sequence/int.hpp gecode/int/sequence/view.hpp Gecode::Int::Sequence::SupportAdvisor Gecode::Int::Sequence::ViewValSupport Gecode::Int::Sequence::ViewValSupportArray Gecode::Int::Sequence::Sequence Gecode Gecode::Int Gecode::Int::Sequence /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *DavidRijsman<David.Rijsman@quintiq.com> * *Copyright: *DavidRijsman,2009 * *Lastmodified: *$Date:2010-04-0812:35:31+0200(Thu,08Apr2010)$ *$Revision:10684$ * *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_SEQUENCE_HH__ #define__GECODE_INT_SEQUENCE_HH__ #include<gecode/int.hh> #include<gecode/int/rel.hh> namespaceGecode{namespaceInt{namespaceSequence{ template<classView> classSupportAdvisor; template<classView,classVal,booliss> classViewValSupport; template<classView,classVal,booliss> classViewValSupportArray{ private: ViewValSupport<View,Val,iss>*xs; intn; public: ViewValSupportArray(void); ViewValSupportArray(constViewValSupportArray<View,Val,iss>&); ViewValSupportArray(Space&home,ViewArray<View>&,Vals,intq); ViewValSupportArray(Space&home,intn); intsize(void)const; ViewValSupport<View,Val,iss>&operator [](intn); constViewValSupport<View,Val,iss>&operator [](int)const; voidupdate(Space&home,boolshare,ViewValSupportArray<View,Val,iss>&x); ExecStatuspropagate(Space&home,ViewArray<View>&a,Vals,intq,intl,intu); ExecStatusadvise(Space&home,ViewArray<View>&a,Vals,intq,intj,constDelta&d); }; template<classView,classVal> classSequence:publicPropagator{ protected: Sequence(Space&home,boolshared,Sequence&p); Sequence(Homehome,ViewArray<View>&x,Vals,intq,intl,intu); public: virtualActor*copy(Space&home,boolshare); ExecStatusadvise(Space&home,Advisor&_a,constDelta&d); virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<View>&x,Vals,intq,intl,intu); staticExecStatuscheck(Space&home,ViewArray<View>&x,Vals,intq,intl,intu); virtualsize_tdispose(Space&home); private: ViewArray<View>x; Vals; intq; intl; intu; ViewValSupportArray<View,Val,true>vvsamax; ViewValSupportArray<View,Val,false>vvsamin; Council<SupportAdvisor<View>>ac; }; }}} #include<gecode/int/sequence/set-op.hpp> #include<gecode/int/sequence/violations.hpp> #include<gecode/int/sequence/int.hpp> #include<gecode/int/sequence/view.hpp> #endif //STATISTICS:int-prop