linear.hh gecode/int.hh gecode/int/linear/int-bin.hpp gecode/int/linear/int-ter.hpp gecode/int/linear/int-nary.hpp gecode/int/linear/int-dom.hpp gecode/int/linear/bool-int.hpp gecode/int/linear/bool-view.hpp gecode/int/linear/bool-scale.hpp gecode/int/linear/post.hpp /usr/include/gecode/int/arithmetic/divmod.hpp /usr/include/gecode/int/arithmetic.hh /usr/include/gecode/int/gcc/post.hpp Gecode::Int::Linear::LinBin Gecode::Int::Linear::ReLinBin Gecode::Int::Linear::EqBin Gecode::Int::Linear::ReEqBin Gecode::Int::Linear::NqBin Gecode::Int::Linear::LqBin Gecode::Int::Linear::GqBin Gecode::Int::Linear::ReLqBin Gecode::Int::Linear::LinTer Gecode::Int::Linear::EqTer Gecode::Int::Linear::NqTer Gecode::Int::Linear::LqTer Gecode::Int::Linear::Lin Gecode::Int::Linear::ReLin Gecode::Int::Linear::Eq Gecode::Int::Linear::DomEq Gecode::Int::Linear::ReEq Gecode::Int::Linear::Nq Gecode::Int::Linear::Lq Gecode::Int::Linear::ReLq Gecode::Int::Linear::LinBoolInt Gecode::Int::Linear::EqBoolInt Gecode::Int::Linear::GqBoolInt Gecode::Int::Linear::NqBoolInt Gecode::Int::Linear::ReLinBoolInt Gecode::Int::Linear::BoolNegTraits Gecode::Int::Linear::ReGqBoolInt Gecode::Int::Linear::ReEqBoolInt Gecode::Int::Linear::LinBoolView Gecode::Int::Linear::EqBoolView Gecode::Int::Linear::NqBoolView Gecode::Int::Linear::GqBoolView Gecode::Int::Linear::ScaleBool Gecode::Int::Linear::ScaleBoolArray Gecode::Int::Linear::ScaleBoolArray::ScaleDec Gecode::Int::Linear::EmptyScaleBoolArray Gecode::Int::Linear::LinBoolScale Gecode::Int::Linear::EqBoolScale Gecode::Int::Linear::LqBoolScale Gecode::Int::Linear::NqBoolScale Gecode::Int::Linear::Term Gecode::Int::Linear Gecode Gecode::Int /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *ChristianSchulte<schulte@gecode.org> *GuidoTack<tack@gecode.org> *TiasGuns<tias.guns@cs.kuleuven.be> * *Copyright: *ChristianSchulte,2002 *GuidoTack,2004 *TiasGuns,2009 * *Lastmodified: *$Date:2013-02-1416:29:11+0100(Thu,14Feb2013)$by$Author:schulte$ *$Revision:13292$ * *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_LINEAR_HH__ #define__GECODE_INT_LINEAR_HH__ #include<gecode/int.hh> namespaceGecode{namespaceInt{namespaceLinear{ /* *Binarypropagators * */ template<classVal,classA,classB,PropCondpc> classLinBin:publicPropagator{ protected: Ax0; Bx1; Valc; LinBin(Space&home,boolshare,LinBin&p); LinBin(Space&home,boolshare,Propagator&p,Ax0,Bx1,Valc); LinBin(Homehome,Ax0,Bx1,Valc); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classVal,classA,classB,PropCondpc,classCtrl> classReLinBin:publicPropagator{ protected: Ax0; Bx1; Valc; Ctrlb; ReLinBin(Space&home,boolshare,ReLinBin&p); ReLinBin(Homehome,Ax0,Bx1,Valc,Ctrlb); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classVal,classA,classB> classEqBin:publicLinBin<Val,A,B,PC_INT_BND>{ protected: usingLinBin<Val,A,B,PC_INT_BND>::x0; usingLinBin<Val,A,B,PC_INT_BND>::x1; usingLinBin<Val,A,B,PC_INT_BND>::c; EqBin(Space&home,boolshare,EqBin&p); EqBin(Homehome,Ax0,Bx1,Valc); public: EqBin(Space&home,boolshare,Propagator&p,Ax0,Bx1,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Valc); }; template<classVal,classA,classB,classCtrl,ReifyModerm> classReEqBin:publicReLinBin<Val,A,B,PC_INT_BND,Ctrl>{ protected: usingReLinBin<Val,A,B,PC_INT_BND,Ctrl>::x0; usingReLinBin<Val,A,B,PC_INT_BND,Ctrl>::x1; usingReLinBin<Val,A,B,PC_INT_BND,Ctrl>::c; usingReLinBin<Val,A,B,PC_INT_BND,Ctrl>::b; ReEqBin(Space&home,boolshare,ReEqBin&p); ReEqBin(Homehome,A,B,Val,Ctrl); public: virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Valc,Ctrlb); }; template<classVal,classA,classB> classNqBin:publicLinBin<Val,A,B,PC_INT_VAL>{ protected: usingLinBin<Val,A,B,PC_INT_VAL>::x0; usingLinBin<Val,A,B,PC_INT_VAL>::x1; usingLinBin<Val,A,B,PC_INT_VAL>::c; NqBin(Space&home,boolshare,NqBin&p); NqBin(Homehome,Ax0,Bx1,Valc); public: NqBin(Space&home,boolshare,Propagator&p,Ax0,Bx1,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); virtualPropCostcost(constSpace&home,constModEventDelta&med)const; staticExecStatuspost(Homehome,Ax0,Bx1,Valc); }; template<classVal,classA,classB> classLqBin:publicLinBin<Val,A,B,PC_INT_BND>{ protected: usingLinBin<Val,A,B,PC_INT_BND>::x0; usingLinBin<Val,A,B,PC_INT_BND>::x1; usingLinBin<Val,A,B,PC_INT_BND>::c; LqBin(Space&home,boolshare,LqBin&p); LqBin(Homehome,Ax0,Bx1,Valc); public: LqBin(Space&home,boolshare,Propagator&p,Ax0,Bx1,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Valc); }; template<classVal,classA,classB> classGqBin:publicLinBin<Val,A,B,PC_INT_BND>{ protected: usingLinBin<Val,A,B,PC_INT_BND>::x0; usingLinBin<Val,A,B,PC_INT_BND>::x1; usingLinBin<Val,A,B,PC_INT_BND>::c; GqBin(Space&home,boolshare,GqBin&p); GqBin(Homehome,Ax0,Bx1,Valc); public: GqBin(Space&home,boolshare,Propagator&p,Ax0,Bx1,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Valc); }; template<classVal,classA,classB,ReifyModerm> classReLqBin:publicReLinBin<Val,A,B,PC_INT_BND,BoolView>{ protected: usingReLinBin<Val,A,B,PC_INT_BND,BoolView>::x0; usingReLinBin<Val,A,B,PC_INT_BND,BoolView>::x1; usingReLinBin<Val,A,B,PC_INT_BND,BoolView>::c; usingReLinBin<Val,A,B,PC_INT_BND,BoolView>::b; ReLqBin(Space&home,boolshare,ReLqBin&p); ReLqBin(Homehome,Ax0,Bx1,Valc,BoolViewb); public: virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Valc,BoolViewb); }; }}} #include<gecode/int/linear/int-bin.hpp> namespaceGecode{namespaceInt{namespaceLinear{ /* *Ternarypropagators * */ template<classVal,classA,classB,classC,PropCondpc> classLinTer:publicPropagator{ protected: Ax0; Bx1; Cx2; Valc; LinTer(Space&home,boolshare,LinTer&p); LinTer(Homehome,Ax0,Bx1,Cx2,Valc); LinTer(Space&home,boolshare,Propagator&p,Ax0,Bx1,Cx2,Valc); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classVal,classA,classB,classC> classEqTer:publicLinTer<Val,A,B,C,PC_INT_BND>{ protected: usingLinTer<Val,A,B,C,PC_INT_BND>::x0; usingLinTer<Val,A,B,C,PC_INT_BND>::x1; usingLinTer<Val,A,B,C,PC_INT_BND>::x2; usingLinTer<Val,A,B,C,PC_INT_BND>::c; EqTer(Space&home,boolshare,EqTer&p); EqTer(Homehome,Ax0,Bx1,Cx2,Valc); public: EqTer(Space&home,boolshare,Propagator&p,Ax0,Bx1,Cx2,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Cx2,Valc); }; template<classVal,classA,classB,classC> classNqTer:publicLinTer<Val,A,B,C,PC_INT_VAL>{ protected: usingLinTer<Val,A,B,C,PC_INT_VAL>::x0; usingLinTer<Val,A,B,C,PC_INT_VAL>::x1; usingLinTer<Val,A,B,C,PC_INT_VAL>::x2; usingLinTer<Val,A,B,C,PC_INT_VAL>::c; NqTer(Space&home,boolshare,NqTer&p); NqTer(Homehome,Ax0,Bx1,Cx2,Valc); public: NqTer(Space&home,boolshare,Propagator&p,Ax0,Bx1,Cx2,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Cx2,Valc); }; template<classVal,classA,classB,classC> classLqTer:publicLinTer<Val,A,B,C,PC_INT_BND>{ protected: usingLinTer<Val,A,B,C,PC_INT_BND>::x0; usingLinTer<Val,A,B,C,PC_INT_BND>::x1; usingLinTer<Val,A,B,C,PC_INT_BND>::x2; usingLinTer<Val,A,B,C,PC_INT_BND>::c; LqTer(Space&home,boolshare,LqTer&p); LqTer(Homehome,Ax0,Bx1,Cx2,Valc); public: LqTer(Space&home,boolshare,Propagator&p,Ax0,Bx1,Cx2,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,Ax0,Bx1,Cx2,Valc); }; }}} #include<gecode/int/linear/int-ter.hpp> namespaceGecode{namespaceInt{namespaceLinear{ /* *n-arypropagators * */ template<classVal,classP,classN,PropCondpc> classLin:publicPropagator{ protected: ViewArray<P>x; ViewArray<N>y; Valc; Lin(Space&home,boolshare,Lin<Val,P,N,pc>&p); Lin(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classVal,classP,classN,PropCondpc,classCtrl> classReLin:publicLin<Val,P,N,pc>{ protected: Ctrlb; ReLin(Space&home,boolshare,ReLin&p); ReLin(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc,Ctrlb); public: virtualsize_tdispose(Space&home); }; template<classVal,classView> voidbounds_p(ModEventDeltamed,ViewArray<View>&x, Val&c,Val&sl,Val&su); template<classVal,classView> voidbounds_n(ModEventDeltamed,ViewArray<View>&y, Val&c,Val&sl,Val&su); template<classVal,classP,classN> classEq:publicLin<Val,P,N,PC_INT_BND>{ protected: usingLin<Val,P,N,PC_INT_BND>::x; usingLin<Val,P,N,PC_INT_BND>::y; usingLin<Val,P,N,PC_INT_BND>::c; Eq(Space&home,boolshare,Eq&p); public: Eq(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); }; template<classVal,classView> classDomEq :publicLin<Val,View,View,PC_INT_DOM>{ protected: usingLin<Val,View,View,PC_INT_DOM>::x; usingLin<Val,View,View,PC_INT_DOM>::y; usingLin<Val,View,View,PC_INT_DOM>::c; DomEq(Space&home,boolshare,DomEq&p); public: DomEq(Homehome,ViewArray<View>&x,ViewArray<View>&y,Valc); virtualActor*copy(Space&home,boolshare); virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<View>&x,ViewArray<View>&y,Valc); }; template<classVal,classP,classN,classCtrl,ReifyModerm> classReEq:publicReLin<Val,P,N,PC_INT_BND,Ctrl>{ protected: usingReLin<Val,P,N,PC_INT_BND,Ctrl>::x; usingReLin<Val,P,N,PC_INT_BND,Ctrl>::y; usingReLin<Val,P,N,PC_INT_BND,Ctrl>::c; usingReLin<Val,P,N,PC_INT_BND,Ctrl>::b; ReEq(Space&home,boolshare,ReEq&p); public: ReEq(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc,Ctrlb); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc,Ctrlb); }; template<classVal,classP,classN> classNq:publicLin<Val,P,N,PC_INT_VAL>{ protected: usingLin<Val,P,N,PC_INT_VAL>::x; usingLin<Val,P,N,PC_INT_VAL>::y; usingLin<Val,P,N,PC_INT_VAL>::c; Nq(Space&home,boolshare,Nq&p); public: Nq(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); }; template<classVal,classP,classN> classLq:publicLin<Val,P,N,PC_INT_BND>{ protected: usingLin<Val,P,N,PC_INT_BND>::x; usingLin<Val,P,N,PC_INT_BND>::y; usingLin<Val,P,N,PC_INT_BND>::c; Lq(Space&home,boolshare,Lq&p); public: Lq(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc); }; template<classVal,classP,classN,ReifyModerm> classReLq:publicReLin<Val,P,N,PC_INT_BND,BoolView>{ protected: usingReLin<Val,P,N,PC_INT_BND,BoolView>::x; usingReLin<Val,P,N,PC_INT_BND,BoolView>::y; usingReLin<Val,P,N,PC_INT_BND,BoolView>::c; usingReLin<Val,P,N,PC_INT_BND,BoolView>::b; ReLq(Space&home,boolshare,ReLq&p); public: ReLq(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc,BoolViewb); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatus post(Homehome,ViewArray<P>&x,ViewArray<N>&y,Valc,BoolViewb); }; }}} #include<gecode/int/linear/int-nary.hpp> #include<gecode/int/linear/int-dom.hpp> namespaceGecode{namespaceInt{namespaceLinear{ /* *Booleanlinearpropagators * */ template<classVX> classLinBoolInt:publicPropagator{ protected: Council<Advisor>co; ViewArray<VX>x; intn_as; intn_hs; intc; voidnormalize(void); LinBoolInt(Space&home,boolshare,LinBoolInt&p); LinBoolInt(Homehome,ViewArray<VX>&x,intn_s,intc); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classVX> classEqBoolInt:publicLinBoolInt<VX>{ protected: usingLinBoolInt<VX>::co; usingLinBoolInt<VX>::x; usingLinBoolInt<VX>::n_as; usingLinBoolInt<VX>::n_hs; usingLinBoolInt<VX>::c; EqBoolInt(Space&home,boolshare,EqBoolInt&p); EqBoolInt(Homehome,ViewArray<VX>&x,intc); public: virtualActor*copy(Space&home,boolshare); virtualExecStatusadvise(Space&home,Advisor&a,constDelta&d); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<VX>&x,intc); }; template<classVX> classGqBoolInt:publicLinBoolInt<VX>{ protected: usingLinBoolInt<VX>::co; usingLinBoolInt<VX>::x; usingLinBoolInt<VX>::n_as; usingLinBoolInt<VX>::n_hs; usingLinBoolInt<VX>::c; GqBoolInt(Space&home,boolshare,GqBoolInt&p); GqBoolInt(Homehome,ViewArray<VX>&x,intc); public: virtualActor*copy(Space&home,boolshare); virtualExecStatusadvise(Space&home,Advisor&a,constDelta&d); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<VX>&x,intc); }; template<classVX> classNqBoolInt:publicBinaryPropagator<VX,PC_INT_VAL>{ protected: usingBinaryPropagator<VX,PC_INT_VAL>::x0; usingBinaryPropagator<VX,PC_INT_VAL>::x1; ViewArray<VX>x; intc; boolresubscribe(Space&home,VX&y); NqBoolInt(Homehome,ViewArray<VX>&b,intc); NqBoolInt(Space&home,boolshare,NqBoolInt<VX>&p); public: virtualActor*copy(Space&home,boolshare); virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<VX>&b,intc); virtualsize_tdispose(Space&home); }; template<classVX,classVB> classReLinBoolInt:publicPropagator{ protected: Council<Advisor>co; ViewArray<VX>x; intn_s; intc; VBb; voidnormalize(void); ReLinBoolInt(Space&home,boolshare,ReLinBoolInt&p); ReLinBoolInt(Homehome,ViewArray<VX>&x,intc,VBb); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classBV> classBoolNegTraits{}; template<classVX,classVB,ReifyModerm> classReGqBoolInt:publicReLinBoolInt<VX,VB>{ protected: usingReLinBoolInt<VX,VB>::co; usingReLinBoolInt<VX,VB>::x; usingReLinBoolInt<VX,VB>::c; usingReLinBoolInt<VX,VB>::b; usingReLinBoolInt<VX,VB>::n_s; usingReLinBoolInt<VX,VB>::normalize; ReGqBoolInt(Space&home,boolshare,ReGqBoolInt&p); ReGqBoolInt(Homehome,ViewArray<VX>&x,intc,VBb); public: virtualActor*copy(Space&home,boolshare); virtualExecStatusadvise(Space&home,Advisor&a,constDelta&d); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<VX>&x,intc,VBb); }; template<classVX,classVB,ReifyModerm> classReEqBoolInt:publicReLinBoolInt<VX,VB>{ protected: usingReLinBoolInt<VX,VB>::co; usingReLinBoolInt<VX,VB>::x; usingReLinBoolInt<VX,VB>::c; usingReLinBoolInt<VX,VB>::b; usingReLinBoolInt<VX,VB>::n_s; usingReLinBoolInt<VX,VB>::normalize; ReEqBoolInt(Space&home,boolshare,ReEqBoolInt&p); ReEqBoolInt(Homehome,ViewArray<VX>&x,intc,VBb); public: virtualActor*copy(Space&home,boolshare); virtualExecStatusadvise(Space&home,Advisor&a,constDelta&d); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<VX>&x,intc,VBb); }; }}} #include<gecode/int/linear/bool-int.hpp> namespaceGecode{namespaceInt{namespaceLinear{ template<classXV,classYV> classLinBoolView:publicPropagator{ protected: ViewArray<XV>x; YVy; intc; LinBoolView(Space&home,boolshare,LinBoolView&p); LinBoolView(Homehome,ViewArray<XV>&x,YVy,intc); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classXV,classYV> classEqBoolView:publicLinBoolView<XV,YV>{ protected: usingLinBoolView<XV,YV>::x; usingLinBoolView<XV,YV>::y; usingLinBoolView<XV,YV>::c; EqBoolView(Space&home,boolshare,EqBoolView&p); EqBoolView(Homehome,ViewArray<XV>&x,YVy,intc); public: virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<XV>&x,YVy,intc); }; template<classXV,classYV> classNqBoolView:publicLinBoolView<XV,YV>{ protected: usingLinBoolView<XV,YV>::x; usingLinBoolView<XV,YV>::y; usingLinBoolView<XV,YV>::c; NqBoolView(Space&home,boolshare,NqBoolView&p); NqBoolView(Homehome,ViewArray<XV>&x,YVy,intc); public: virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<XV>&x,YVy,intc); }; template<classXV,classYV> classGqBoolView:publicLinBoolView<XV,YV>{ protected: usingLinBoolView<XV,YV>::x; usingLinBoolView<XV,YV>::y; usingLinBoolView<XV,YV>::c; GqBoolView(Space&home,boolshare,GqBoolView&p); GqBoolView(Homehome,ViewArray<XV>&x,YVy,intc); public: virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,ViewArray<XV>&x,YVy,intc); }; }}} #include<gecode/int/linear/bool-view.hpp> namespaceGecode{namespaceInt{namespaceLinear{ classScaleBool{ public: inta; BoolViewx; }; classScaleBoolArray{ private: ScaleBool*_fst; ScaleBool*_lst; public: ScaleBoolArray(void); ScaleBoolArray(Space&home,intn); voidsubscribe(Space&home,Propagator&p); voidcancel(Space&home,Propagator&p); voidupdate(Space&home,boolshare,ScaleBoolArray&sba); ScaleBool*fst(void)const; ScaleBool*lst(void)const; voidfst(ScaleBool*f); voidlst(ScaleBool*l); boolempty(void)const; intsize(void)const; private: classScaleDec{ public: bool operator()(constScaleBool&x,constScaleBool&y); }; public: voidsort(void); }; classEmptyScaleBoolArray{ public: EmptyScaleBoolArray(void); EmptyScaleBoolArray(Space&home,intn); voidsubscribe(Space&home,Propagator&p); voidcancel(Space&home,Propagator&p); voidupdate(Space&home,boolshare,EmptyScaleBoolArray&esba); ScaleBool*fst(void)const; ScaleBool*lst(void)const; voidfst(ScaleBool*f); voidlst(ScaleBool*l); boolempty(void)const; intsize(void)const; voidsort(void); }; template<classSBAP,classSBAN,classVX,PropCondpcx> classLinBoolScale:publicPropagator{ protected: SBAPp; SBANn; VXx; intc; public: LinBoolScale(Homehome,SBAP&p,SBAN&n,VXx,intc); LinBoolScale(Space&home,boolshare,Propagator&pr, SBAP&p,SBAN&n,VXx,intc); virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classSBAP,classSBAN,classVX> classEqBoolScale:publicLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>{ protected: usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::p; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::n; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::x; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::c; public: EqBoolScale(Homehome,SBAP&p,SBAN&n,VXx,intc); EqBoolScale(Space&home,boolshare,Propagator&pr, SBAP&p,SBAN&n,VXx,intc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,SBAP&p,SBAN&n,VXx,intc); }; template<classSBAP,classSBAN,classVX> classLqBoolScale:publicLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>{ protected: usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::p; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::n; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::x; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_BND>::c; public: LqBoolScale(Homehome,SBAP&p,SBAN&n,VXx,intc); LqBoolScale(Space&home,boolshare,Propagator&pr, SBAP&p,SBAN&n,VXx,intc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,SBAP&p,SBAN&n,VXx,intc); }; template<classSBAP,classSBAN,classVX> classNqBoolScale:publicLinBoolScale<SBAP,SBAN,VX,PC_INT_VAL>{ protected: usingLinBoolScale<SBAP,SBAN,VX,PC_INT_VAL>::p; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_VAL>::n; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_VAL>::x; usingLinBoolScale<SBAP,SBAN,VX,PC_INT_VAL>::c; public: NqBoolScale(Homehome,SBAP&p,SBAN&n,VXx,intc); NqBoolScale(Space&home,boolshare,Propagator&pr, SBAP&p,SBAN&n,VXx,intc); virtualActor*copy(Space&home,boolshare); virtualExecStatuspropagate(Space&home,constModEventDelta&med); staticExecStatuspost(Homehome,SBAP&p,SBAN&n,VXx,intc); }; }}} #include<gecode/int/linear/bool-scale.hpp> namespaceGecode{namespaceInt{namespaceLinear{ template<classView> classTerm{ public: inta; Viewx; }; template<classView> voidestimate(Term<View>*t,intn,intc, int&l,int&u); GECODE_INT_EXPORTvoid post(Homehome,Term<IntView>*t,intn,IntRelTypeirt,intc, IntConLevel=ICL_DEF); GECODE_INT_EXPORTvoid post(Homehome,Term<IntView>*t,intn,IntRelTypeirt,intc,Reifyr, IntConLevel=ICL_DEF); GECODE_INT_EXPORTvoid post(Homehome,Term<BoolView>*t,intn,IntRelTypeirt,intc, IntConLevel=ICL_DEF); GECODE_INT_EXPORTvoid post(Homehome,Term<BoolView>*t,intn,IntRelTypeirt,intc,Reifyr, IntConLevel=ICL_DEF); GECODE_INT_EXPORTvoid post(Homehome,Term<BoolView>*t,intn,IntRelTypeirt,IntViewy,intc=0, IntConLevel=ICL_DEF); GECODE_INT_EXPORTvoid post(Homehome,Term<BoolView>*t,intn,IntRelTypeirt,IntViewy, Reifyr,IntConLevel=ICL_DEF); }}} #include<gecode/int/linear/post.hpp> #endif //STATISTICS:int-prop