var-imp.hpp cmath gecode/float/var-imp/delta.hpp gecode/float/var-imp/float.hpp /usr/include/gecode/float.hh Gecode::Float::FloatDelta Gecode::Float::FloatVarImp Gecode Gecode::Float /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *FilipKonvicka<filip.konvicka@logis.cz> *LubomirMoric<lubomir.moric@logis.cz> *VincentBarichard<Vincent.Barichard@univ-angers.fr> * *Contributingauthors: *ChristianSchulte<schulte@gecode.org> * *Copyright: *LOGIS,s.r.o.,2008 *ChristianSchulte,2010 *VincentBarichard,2012 * *Lastmodified: *$Date:2013-02-0417:54:05+0100(Mon,04Feb2013)$by$Author:schulte$ *$Revision:13260$ * *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. * */ #include<cmath> namespaceGecode{namespaceFloat{ classFloatVarImp; classFloatDelta:publicDelta{ friendclassFloatVarImp; private: FloatNum_min; FloatNum_max; public: FloatDelta(void); FloatDelta(FloatNummin,FloatNummax); private: FloatNummin(void)const; FloatNummax(void)const; }; }} #include<gecode/float/var-imp/delta.hpp> namespaceGecode{namespaceFloat{ classFloatVarImp:publicFloatVarImpBase{ protected: FloatValdom; FloatVarImp(Space&home,boolshare,FloatVarImp&x); public: FloatVarImp(Space&home,constFloatVal&d); FloatValdomain(void)const; FloatNummin(void)const; FloatNummax(void)const; FloatValval(void)const; FloatNummed(void)const; FloatNumsize(void)const; boolassigned(void)const; boolzero_in(void)const; boolin(FloatNumn)const; boolin(constFloatVal&n)const; ModEventeq(Space&home,FloatNumn); ModEventeq(Space&home,constFloatVal&n); ModEventlq(Space&home,FloatNumn); ModEventlq(Space&home,constFloatVal&n); ModEventgq(Space&home,FloatNumn); ModEventgq(Space&home,constFloatVal&n); voidsubscribe(Space&home,Propagator&p,PropCondpc,boolschedule=true); voidcancel(Space&home,Propagator&p,PropCondpc); voidsubscribe(Space&home,Advisor&a); voidcancel(Space&home,Advisor&a); staticModEventDeltamed(ModEventme); private: GECODE_FLOAT_EXPORTFloatVarImp*perform_copy(Space&home,boolshare); public: FloatVarImp*copy(Space&home,boolshare); staticFloatNummin(constDelta&d); staticFloatNummax(constDelta&d); }; }} #include<gecode/float/var-imp/float.hpp> //STATISTICS:float-var