float.hh climits cfloat iostream gecode/kernel.hh gecode/int.hh gecode/support/auto-link.hpp gecode/third-party/boost/numeric/interval.hpp gecode/float/exception.hpp gecode/float/nextafter.hpp gecode/float/num.hpp gecode/float/rounding.hpp gecode/float/val.hpp gecode/float/limits.hpp gecode/float/var-imp.hpp gecode/float/view.hpp gecode/float/array-traits.hpp gecode/float/array.hpp gecode/float/branch/traits.hpp gecode/float/branch/afc.hpp gecode/float/branch/activity.hpp gecode/float/branch/var.hpp gecode/float/branch/val.hpp gecode/float/branch/assign.hpp /usr/include/gecode/float/arithmetic.hh /usr/include/gecode/float/branch.hh /usr/include/gecode/float/linear.hh /usr/include/gecode/float/rel.hh Gecode::Float::Rounding Gecode::FloatVal Gecode::FloatVar Gecode::FloatValArgs Gecode::FloatVarArgs Gecode::FloatVarArray Gecode::FloatNumBranch Gecode::FloatAFC Gecode::FloatActivity Gecode::FloatVarBranch Gecode::FloatValBranch Gecode::FloatAssign Gecode::Float Gecode Gecode::Float::Limits GECODE_FLOAT_EXPORT GECODE_LIBRARY_NAME "Float" /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *ChristianSchulte<schulte@gecode.org> *GuidoTack<tack@gecode.org> *VincentBarichard<Vincent.Barichard@univ-angers.fr> * *Copyright: *ChristianSchulte,2002 *GuidoTack,2004 *VincentBarichard,2012 * *Lastmodified: *$Date:2013-07-2314:31:03+0200(Tue,23Jul2013)$by$Author:schulte$ *$Revision:13939$ * *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_FLOAT_HH__ #define__GECODE_FLOAT_HH__ #include<climits> #include<cfloat> #include<iostream> #include<gecode/kernel.hh> #include<gecode/int.hh> /* *Configurelinking * */ #if!defined(GECODE_STATIC_LIBS)&&\ (defined(__CYGWIN__)||defined(__MINGW32__)||defined(_MSC_VER)) #ifdefGECODE_BUILD_FLOAT #defineGECODE_FLOAT_EXPORT__declspec(dllexport) #else #defineGECODE_FLOAT_EXPORT__declspec(dllimport) #endif #else #ifdefGECODE_GCC_HAS_CLASS_VISIBILITY #defineGECODE_FLOAT_EXPORT__attribute__((visibility("default"))) #else #defineGECODE_FLOAT_EXPORT #endif #endif //Configureauto-linking #ifndefGECODE_BUILD_FLOAT #defineGECODE_LIBRARY_NAME"Float" #include<gecode/support/auto-link.hpp> #endif //Includeintervalimplementation #include<gecode/third-party/boost/numeric/interval.hpp> #include<gecode/float/exception.hpp> #include<gecode/float/nextafter.hpp> namespaceGecode{ typedefdoubleFloatNum; FloatNumpi_half_lower(void); FloatNumpi_half_upper(void); FloatNumpi_lower(void); FloatNumpi_upper(void); FloatNumpi_twice_lower(void); FloatNumpi_twice_upper(void); //Forwarddeclaration classFloatVal; } #include<gecode/float/num.hpp> namespaceGecode{namespaceFloat{ classRounding: publicboost::numeric::interval_lib::rounded_arith_opp<FloatNum>{ protected: typedefboost::numeric::interval_lib::rounded_arith_opp<FloatNum>Base; public: Rounding(void); ~Rounding(void); FloatNumadd_down(FloatNumx,FloatNumy); FloatNumadd_up(FloatNumx,FloatNumy); FloatNumsub_down(FloatNumx,FloatNumy); FloatNumsub_up(FloatNumx,FloatNumy); FloatNummul_down(FloatNumx,FloatNumy); FloatNummul_up(FloatNumx,FloatNumy); FloatNumdiv_down(FloatNumx,FloatNumy); FloatNumdiv_up(FloatNumx,FloatNumy); FloatNumsqrt_down(FloatNumx); FloatNumsqrt_up(FloatNumx); FloatNummedian(FloatNumx,FloatNumy); FloatNumint_down(FloatNumx); FloatNumint_up(FloatNumx); #ifdefGECODE_HAS_MPFR GECODE_FLOAT_EXPORTFloatNumexp_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumexp_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumlog_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumlog_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumsin_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumsin_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumcos_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumcos_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumtan_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumtan_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumasin_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumasin_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumacos_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumacos_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumatan_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumatan_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumsinh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumsinh_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumcosh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumcosh_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumtanh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumtanh_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumasinh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumasinh_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumacosh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumacosh_up(FloatNumx); GECODE_FLOAT_EXPORTFloatNumatanh_down(FloatNumx); GECODE_FLOAT_EXPORTFloatNumatanh_up(FloatNumx); #endif }; }} #include<gecode/float/rounding.hpp> namespaceGecode{namespaceFloat{ boolsubset(constFloatVal&x,constFloatVal&y); boolproper_subset(constFloatVal&x,constFloatVal&y); booloverlap(constFloatVal&x,constFloatVal&y); FloatValintersect(constFloatVal&x,constFloatVal&y); FloatValhull(constFloatVal&x,constFloatVal&y); FloatValhull(constFloatVal&x,constFloatNum&y); FloatValhull(constFloatNum&x,constFloatVal&y); FloatValhull(constFloatNum&x,constFloatNum&y); }} namespaceGecode{ classFloatVal{ friendFloatValoperator+(constFloatVal&x); friendFloatValoperator-(constFloatVal&x); friendFloatValoperator+(constFloatVal&x,constFloatVal&y); friendFloatValoperator+(constFloatVal&x,constFloatNum&y); friendFloatValoperator+(constFloatNum&x,constFloatVal&y); friendFloatValoperator-(constFloatVal&x,constFloatVal&y); friendFloatValoperator-(constFloatVal&x,constFloatNum&y); friendFloatValoperator-(constFloatNum&x,constFloatVal&y); friendFloatValoperator*(constFloatVal&x,constFloatVal&y); friendFloatValoperator*(constFloatVal&x,constFloatNum&y); friendFloatValoperator*(constFloatNum&x,constFloatVal&y); friendFloatValoperator/(constFloatVal&x,constFloatVal&y); friendFloatValoperator/(constFloatVal&x,constFloatNum&y); friendFloatValoperator/(constFloatNum&x,constFloatVal&y); friendbooloperator<(constFloatVal&x,constFloatVal&y); friendbooloperator<(constFloatVal&x,constFloatNum&y); friendbooloperator<(constFloatNum&x,constFloatVal&y); friendbooloperator<=(constFloatVal&x,constFloatVal&y); friendbooloperator<=(constFloatVal&x,constFloatNum&y); friendbooloperator<=(constFloatNum&x,constFloatVal&y); friendbooloperator>(constFloatVal&x,constFloatVal&y); friendbooloperator>(constFloatVal&x,constFloatNum&y); friendbooloperator>(constFloatNum&x,constFloatVal&y); friendbooloperator>=(constFloatVal&x,constFloatVal&y); friendbooloperator>=(constFloatVal&x,constFloatNum&y); friendbooloperator>=(constFloatNum&x,constFloatVal&y); friendbooloperator==(constFloatVal&x,constFloatVal&y); friendbooloperator==(constFloatVal&x,constFloatNum&y); friendbooloperator==(constFloatNum&x,constFloatVal&y); friendbooloperator!=(constFloatVal&x,constFloatVal&y); friendbooloperator!=(constFloatVal&x,constFloatNum&y); friendbooloperator!=(constFloatNum&x,constFloatVal&y); template<classChar,classTraits> friendstd::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>&os,constFloatVal&x); friendFloatValabs(constFloatVal&x); friendFloatValsqrt(constFloatVal&x); friendFloatValsqr(constFloatVal&x); friendFloatValpow(constFloatVal&x,intn); friendFloatValnroot(constFloatVal&x,intn); friendFloatValmax(constFloatVal&x,constFloatVal&y); friendFloatValmax(constFloatVal&x,constFloatNum&y); friendFloatValmax(constFloatNum&x,constFloatVal&y); friendFloatValmin(constFloatVal&x,constFloatVal&y); friendFloatValmin(constFloatVal&x,constFloatNum&y); friendFloatValmin(constFloatNum&x,constFloatVal&y); #ifdefGECODE_HAS_MPFR friendFloatValexp(constFloatVal&x); friendFloatVallog(constFloatVal&x); friendFloatValfmod(constFloatVal&x,constFloatVal&y); friendFloatValfmod(constFloatVal&x,constFloatNum&y); friendFloatValfmod(constFloatNum&x,constFloatVal&y); friendFloatValsin(constFloatVal&x); friendFloatValcos(constFloatVal&x); friendFloatValtan(constFloatVal&x); friendFloatValasin(constFloatVal&x); friendFloatValacos(constFloatVal&x); friendFloatValatan(constFloatVal&x); friendFloatValsinh(constFloatVal&x); friendFloatValcosh(constFloatVal&x); friendFloatValtanh(constFloatVal&x); friendFloatValasinh(constFloatVal&x); friendFloatValacosh(constFloatVal&x); friendFloatValatanh(constFloatVal&x); #endif friendboolFloat::subset(constFloatVal&x,constFloatVal&y); friendboolFloat::proper_subset(constFloatVal&x,constFloatVal&y); friendboolFloat::overlap(constFloatVal&x,constFloatVal&y); friendFloatValFloat::intersect(constFloatVal&x,constFloatVal&y); friendFloatValFloat::hull(constFloatVal&x,constFloatVal&y); friendFloatValFloat::hull(constFloatVal&x,constFloatNum&y); friendFloatValFloat::hull(constFloatNum&x,constFloatVal&y); friendFloatValFloat::hull(constFloatNum&x,constFloatNum&y); protected: typedefboost::numeric::interval_lib::save_state<Float::Rounding>R; typedefboost::numeric::interval_lib::checking_strict<FloatNum>P; typedefboost::numeric::interval <FloatNum, boost::numeric::interval_lib::policies<R, P>> FloatValImpType; FloatValImpTypex; explicitFloatVal(constFloatValImpType&i); public: FloatVal(void); FloatVal(constFloatNum&n); FloatVal(constFloatNum&l,constFloatNum&u); FloatVal(constFloatVal&v); FloatVal&operator =(constFloatNum&n); FloatVal&operator =(constFloatVal&v); voidassign(FloatNumconst&l,FloatNumconst&u); FloatNummin(void)const; FloatNummax(void)const; FloatNumsize(void)const; FloatNummed(void)const; booltight(void)const; boolsingleton(void)const; boolin(FloatNumn)const; boolzero_in(void)const; staticFloatValhull(FloatNumx,FloatNumy); staticFloatValpi_half(void); staticFloatValpi(void); staticFloatValpi_twice(void); FloatVal&operator +=(constFloatNum&n); FloatVal&operator -=(constFloatNum&n); FloatVal&operator *=(constFloatNum&n); FloatVal&operator /=(constFloatNum&n); FloatVal&operator +=(constFloatVal&v); FloatVal&operator -=(constFloatVal&v); FloatVal&operator *=(constFloatVal&v); FloatVal&operator /=(constFloatVal&v); }; FloatValoperator+(constFloatVal&x); FloatValoperator-(constFloatVal&x); FloatValoperator+(constFloatVal&x,constFloatVal&y); FloatValoperator+(constFloatVal&x,constFloatNum&y); FloatValoperator+(constFloatNum&x,constFloatVal&y); FloatValoperator-(constFloatVal&x,constFloatVal&y); FloatValoperator-(constFloatVal&x,constFloatNum&y); FloatValoperator-(constFloatNum&x,constFloatVal&y); FloatValoperator*(constFloatVal&x,constFloatVal&y); FloatValoperator*(constFloatVal&x,constFloatNum&y); FloatValoperator*(constFloatNum&x,constFloatVal&y); FloatValoperator/(constFloatVal&x,constFloatVal&y); FloatValoperator/(constFloatVal&x,constFloatNum&y); FloatValoperator/(constFloatNum&r,constFloatVal&x); booloperator<(constFloatVal&x,constFloatVal&y); booloperator<(constFloatVal&x,constFloatNum&y); booloperator<(constFloatNum&x,constFloatVal&y); booloperator<=(constFloatVal&x,constFloatVal&y); booloperator<=(constFloatVal&x,constFloatNum&y); booloperator<=(constFloatNum&x,constFloatVal&y); booloperator>(constFloatVal&x,constFloatVal&y); booloperator>(constFloatVal&x,constFloatNum&y); booloperator>(constFloatNum&x,constFloatVal&y); booloperator>=(constFloatVal&x,constFloatVal&y); booloperator>=(constFloatVal&x,constFloatNum&y); booloperator>=(constFloatNum&x,constFloatVal&y); booloperator==(constFloatVal&x,constFloatVal&y); booloperator==(constFloatVal&x,constFloatNum&y); booloperator==(constFloatNum&x,constFloatVal&y); booloperator!=(constFloatVal&x,constFloatVal&y); booloperator!=(constFloatVal&x,constFloatNum&y); booloperator!=(constFloatNum&x,constFloatVal&y); template<classChar,classTraits> std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>&os,constFloatVal&x); FloatValabs(constFloatVal&x); FloatValsqrt(constFloatVal&x); FloatValsqr(constFloatVal&x); FloatValpow(constFloatVal&x,intn); FloatValnroot(constFloatVal&x,intn); FloatValmax(constFloatVal&x,constFloatVal&y); FloatValmax(constFloatVal&x,constFloatNum&y); FloatValmax(constFloatNum&x,constFloatVal&y); FloatValmin(constFloatVal&x,constFloatVal&y); FloatValmin(constFloatVal&x,constFloatNum&y); FloatValmin(constFloatNum&x,constFloatVal&y); #ifdefGECODE_HAS_MPFR /*transcendentalfunctions:exp,log*/ FloatValexp(constFloatVal&x); FloatVallog(constFloatVal&x); FloatValfmod(constFloatVal&x,constFloatVal&y); FloatValfmod(constFloatVal&x,constFloatNum&y); FloatValfmod(constFloatNum&x,constFloatVal&y); FloatValsin(constFloatVal&x); FloatValcos(constFloatVal&x); FloatValtan(constFloatVal&x); FloatValasin(constFloatVal&x); FloatValacos(constFloatVal&x); FloatValatan(constFloatVal&x); FloatValsinh(constFloatVal&x); FloatValcosh(constFloatVal&x); FloatValtanh(constFloatVal&x); FloatValasinh(constFloatVal&x); FloatValacosh(constFloatVal&x); FloatValatanh(constFloatVal&x); #endif } #include<gecode/float/val.hpp> namespaceGecode{namespaceFloat{ namespaceLimits{ constFloatNummax=std::numeric_limits<FloatNum>::max(); constFloatNummin=-max; boolvalid(constFloatVal&n); voidcheck(constFloatVal&n,constchar*l); } }} #include<gecode/float/limits.hpp> #include<gecode/float/var-imp.hpp> namespaceGecode{ namespaceFloat{ classFloatView; } classFloatVar:publicVarImpVar<Float::FloatVarImp>{ friendclassFloatVarArray; friendclassFloatVarArgs; private: usingVarImpVar<Float::FloatVarImp>::x; void_init(Space&home,FloatNummin,FloatNummax); public: FloatVar(void); FloatVar(constFloatVar&y); FloatVar(constFloat::FloatView&y); GECODE_FLOAT_EXPORTFloatVar(Space&home,FloatNummin,FloatNummax); FloatValdomain(void)const; FloatNummin(void)const; FloatNummax(void)const; FloatNummed(void)const; FloatNumsize(void)const; FloatValval(void)const; boolin(constFloatVal&n)const; }; template<classChar,classTraits> std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>&os,constFloatVar&x); } #include<gecode/float/view.hpp> #include<gecode/float/array-traits.hpp> namespaceGecode{ classFloatValArgs:publicPrimArgArray<FloatVal>{ public: FloatValArgs(void); explicitFloatValArgs(intn); FloatValArgs(constSharedArray<FloatVal>&x); FloatValArgs(conststd::vector<FloatVal>&x); template<classInputIterator> FloatValArgs(InputIteratorfirst,InputIteratorlast); GECODE_FLOAT_EXPORT FloatValArgs(intn,inte0,...); FloatValArgs(intn,constFloatVal*e); FloatValArgs(constPrimArgArray<FloatVal>&a); staticFloatValArgscreate(intn,FloatValstart,intinc=1); }; classFloatVarArgs:publicVarArgArray<FloatVar>{ public: FloatVarArgs(void){} explicitFloatVarArgs(intn):VarArgArray<FloatVar>(n){} FloatVarArgs(constFloatVarArgs&a):VarArgArray<FloatVar>(a){} FloatVarArgs(constVarArray<FloatVar>&a):VarArgArray<FloatVar>(a){} FloatVarArgs(conststd::vector<FloatVar>&a):VarArgArray<FloatVar>(a){} template<classInputIterator> FloatVarArgs(InputIteratorfirst,InputIteratorlast) :VarArgArray<FloatVar>(first,last){} GECODE_FLOAT_EXPORT FloatVarArgs(Space&home,intn,FloatNummin,FloatNummax); }; classFloatVarArray:publicVarArray<FloatVar>{ public: FloatVarArray(void); FloatVarArray(Space&home,intn); FloatVarArray(constFloatVarArray&a); FloatVarArray(Space&home,constFloatVarArgs&a); GECODE_FLOAT_EXPORT FloatVarArray(Space&home,intn,FloatNummin,FloatNummax); }; } #include<gecode/float/array.hpp> namespaceGecode{ enumFloatRelType{ FRT_EQ, FRT_NQ, FRT_LQ, FRT_LE, FRT_GQ, FRT_GR }; GECODE_FLOAT_EXPORTvoid dom(Homehome,FloatVarx,FloatValn); GECODE_FLOAT_EXPORTvoid dom(Homehome,constFloatVarArgs&x,FloatValn); GECODE_FLOAT_EXPORTvoid dom(Homehome,FloatVarx,FloatNuml,FloatNumm); GECODE_FLOAT_EXPORTvoid dom(Homehome,constFloatVarArgs&x,FloatNuml,FloatNumu); GECODE_FLOAT_EXPORTvoid dom(Homehome,FloatVarx,FloatValn,Reifyr); GECODE_FLOAT_EXPORTvoid dom(Homehome,FloatVarx,FloatNuml,FloatNumu,Reifyr); GECODE_FLOAT_EXPORTvoid dom(Homehome,FloatVarx,FloatVard); GECODE_FLOAT_EXPORTvoid dom(Homehome,constFloatVarArgs&x,constFloatVarArgs&d); GECODE_FLOAT_EXPORTvoid rel(Homehome,FloatVarx0,FloatRelTypefrt,FloatVarx1); GECODE_FLOAT_EXPORTvoid rel(Homehome,FloatVarx,FloatRelTypefrt,FloatValc); GECODE_FLOAT_EXPORTvoid rel(Homehome,FloatVarx,FloatRelTypefrt,FloatValc,Reifyr); GECODE_FLOAT_EXPORTvoid rel(Homehome,FloatVarx0,FloatRelTypefrt,FloatVarx1,Reifyr); GECODE_FLOAT_EXPORTvoid rel(Homehome,constFloatVarArgs&x,FloatRelTypefrt,FloatValc); GECODE_FLOAT_EXPORTvoid rel(Homehome,constFloatVarArgs&x,FloatRelTypefrt,FloatVary); } namespaceGecode{ GECODE_FLOAT_EXPORTvoid min(Homehome,FloatVarx0,FloatVarx1,FloatVarx2); GECODE_FLOAT_EXPORTvoid min(Homehome,constFloatVarArgs&x,FloatVary); GECODE_FLOAT_EXPORTvoid max(Homehome,FloatVarx0,FloatVarx1,FloatVarx2); GECODE_FLOAT_EXPORTvoid max(Homehome,constFloatVarArgs&x,FloatVary); GECODE_FLOAT_EXPORTvoid abs(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid mult(Homehome,FloatVarx0,FloatVarx1,FloatVarx2); GECODE_FLOAT_EXPORTvoid sqr(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid sqrt(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid pow(Homehome,FloatVarx0,intn,FloatVarx1); GECODE_FLOAT_EXPORTvoid nroot(Homehome,FloatVarx0,intn,FloatVarx1); GECODE_FLOAT_EXPORTvoid div(Homehome,FloatVarx0,FloatVarx1,FloatVarx2); #ifdefGECODE_HAS_MPFR GECODE_FLOAT_EXPORTvoid exp(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid log(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid pow(Homehome,FloatNumbase,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid log(Homehome,FloatNumbase,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid asin(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid sin(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid acos(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid cos(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid atan(Homehome,FloatVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid tan(Homehome,FloatVarx0,FloatVarx1); #endif GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatVarArgs&x, FloatRelTypefrt,FloatNumc); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatVarArgs&x, FloatRelTypefrt,FloatVary); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatVarArgs&x, FloatRelTypefrt,FloatNumc,Reifyr); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatVarArgs&x, FloatRelTypefrt,FloatVary,Reifyr); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatValArgs&a,constFloatVarArgs&x, FloatRelTypefrt,FloatNumc); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatValArgs&a,constFloatVarArgs&x, FloatRelTypefrt,FloatVary); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatValArgs&a,constFloatVarArgs&x, FloatRelTypefrt,FloatNumc,Reifyr); GECODE_FLOAT_EXPORTvoid linear(Homehome,constFloatValArgs&a,constFloatVarArgs&x, FloatRelTypefrt,FloatVary,Reifyr); GECODE_FLOAT_EXPORTvoid channel(Homehome,FloatVarx0,IntVarx1); GECODE_FLOAT_EXPORTvoid channel(Homehome,IntVarx0,FloatVarx1); GECODE_FLOAT_EXPORTvoid wait(Homehome,FloatVarx,void(*c)(Space&home)); GECODE_FLOAT_EXPORTvoid wait(Homehome,constFloatVarArgs&x,void(*c)(Space&home)); } namespaceGecode{ typedefbool(*FloatBranchFilter)(constSpace&home,FloatVarx,inti); typedefdouble(*FloatBranchMerit)(constSpace&home,FloatVarx,inti); classFloatNumBranch{ public: FloatNumn; booll; }; typedefFloatNumBranch(*FloatBranchVal)(constSpace&home,FloatVarx,inti); typedefvoid(*FloatBranchCommit)(Space&home,unsignedinta, FloatVarx,inti,FloatNumBranchnl); } #include<gecode/float/branch/traits.hpp> namespaceGecode{ classFloatAFC:publicAFC{ public: FloatAFC(void); FloatAFC(constFloatAFC&a); FloatAFC&operator =(constFloatAFC&a); FloatAFC(Homehome,constFloatVarArgs&x,doubled=1.0); voidinit(Home,constFloatVarArgs&x,doubled=1.0); }; } #include<gecode/float/branch/afc.hpp> namespaceGecode{ classFloatActivity:publicActivity{ public: FloatActivity(void); FloatActivity(constFloatActivity&a); FloatActivity&operator =(constFloatActivity&a); GECODE_FLOAT_EXPORT FloatActivity(Homehome,constFloatVarArgs&x,doubled=1.0, FloatBranchMeritbm=NULL); GECODE_FLOAT_EXPORTvoid init(Home,constFloatVarArgs&x,doubled=1.0, FloatBranchMeritbm=NULL); }; } #include<gecode/float/branch/activity.hpp> namespaceGecode{ typedefvoid(*FloatVarValPrint)(constSpace&home,constBrancherHandle&bh, unsignedinta, FloatVarx,inti,constFloatNumBranch&n, std::ostream&o); } namespaceGecode{ classFloatVarBranch:publicVarBranch{ public: enumSelect{ SEL_NONE=0, SEL_RND, SEL_MERIT_MIN, SEL_MERIT_MAX, SEL_DEGREE_MIN, SEL_DEGREE_MAX, SEL_AFC_MIN, SEL_AFC_MAX, SEL_ACTIVITY_MIN, SEL_ACTIVITY_MAX, SEL_MIN_MIN, SEL_MIN_MAX, SEL_MAX_MIN, SEL_MAX_MAX, SEL_SIZE_MIN, SEL_SIZE_MAX, SEL_DEGREE_SIZE_MIN, SEL_DEGREE_SIZE_MAX, SEL_AFC_SIZE_MIN, SEL_AFC_SIZE_MAX, SEL_ACTIVITY_SIZE_MIN, SEL_ACTIVITY_SIZE_MAX }; protected: Selects; public: FloatVarBranch(void); FloatVarBranch(Rndr); FloatVarBranch(Selects,BranchTblt); FloatVarBranch(Selects,double,BranchTblt); FloatVarBranch(Selects,AFCa,BranchTblt); FloatVarBranch(Selects,Activitya,BranchTblt); FloatVarBranch(Selects,VoidFunctionmf,BranchTblt); Selectselect(void)const; voidexpand(Homehome,constFloatVarArgs&x); }; FloatVarBranchFLOAT_VAR_NONE(void); FloatVarBranchFLOAT_VAR_RND(Rndr); FloatVarBranchFLOAT_VAR_MERIT_MIN(FloatBranchMeritbm,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_MERIT_MAX(FloatBranchMeritbm,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_DEGREE_MIN(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_DEGREE_MAX(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_MIN(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_MIN(FloatAFCa,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_MAX(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_MAX(FloatAFCa,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_MIN(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_MIN(FloatActivitya,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_MAX(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_MAX(FloatActivitya,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_MIN_MIN(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_MIN_MAX(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_MAX_MIN(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_MAX_MAX(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_SIZE_MIN(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_SIZE_MAX(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_DEGREE_SIZE_MIN(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_DEGREE_SIZE_MAX(BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_SIZE_MIN(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_SIZE_MIN(FloatAFCa,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_SIZE_MAX(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_AFC_SIZE_MAX(FloatAFCa,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_SIZE_MIN(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_SIZE_MIN(FloatActivitya,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_SIZE_MAX(doubled=1.0,BranchTbltbl=NULL); FloatVarBranchFLOAT_VAR_ACTIVITY_SIZE_MAX(FloatActivitya,BranchTbltbl=NULL); } #include<gecode/float/branch/var.hpp> namespaceGecode{ classFloatValBranch:publicValBranch{ public: enumSelect{ SEL_SPLIT_MIN, SEL_SPLIT_MAX, SEL_SPLIT_RND, SEL_VAL_COMMIT, }; protected: Selects; public: FloatValBranch(Selects=SEL_SPLIT_MIN); FloatValBranch(Rndr); FloatValBranch(VoidFunctionv,VoidFunctionc); Selectselect(void)const; }; FloatValBranchFLOAT_VAL_SPLIT_MIN(void); FloatValBranchFLOAT_VAL_SPLIT_MAX(void); FloatValBranchFLOAT_VAL_SPLIT_RND(Rndr); FloatValBranchFLOAT_VAL(FloatBranchValv,FloatBranchCommitc=NULL); } #include<gecode/float/branch/val.hpp> namespaceGecode{ classFloatAssign:publicValBranch{ public: enumSelect{ SEL_MIN, SEL_MAX, SEL_RND, SEL_VAL_COMMIT }; protected: Selects; public: FloatAssign(Selects=SEL_MIN); FloatAssign(Rndr); FloatAssign(VoidFunctionv,VoidFunctionc); Selectselect(void)const; }; FloatAssignFLOAT_ASSIGN_MIN(void); FloatAssignFLOAT_ASSIGN_MAX(void); FloatAssignFLOAT_ASSIGN_RND(Rndr); FloatAssignFLOAT_ASSIGN(FloatBranchValv,FloatBranchCommitc=NULL); } #include<gecode/float/branch/assign.hpp> namespaceGecode{ GECODE_FLOAT_EXPORTBrancherHandle branch(Homehome,constFloatVarArgs&x, FloatVarBranchvars,FloatValBranchvals, FloatBranchFilterbf=NULL, FloatVarValPrintvvp=NULL); GECODE_FLOAT_EXPORTBrancherHandle branch(Homehome,constFloatVarArgs&x, TieBreak<FloatVarBranch>vars,FloatValBranchvals, FloatBranchFilterbf=NULL, FloatVarValPrintvvp=NULL); GECODE_FLOAT_EXPORTBrancherHandle branch(Homehome,FloatVarx,FloatValBranchvals, FloatVarValPrintvvp=NULL); GECODE_FLOAT_EXPORTBrancherHandle assign(Homehome,constFloatVarArgs&x,FloatAssignvals, FloatBranchFilterfbf=NULL, FloatVarValPrintvvp=NULL); GECODE_FLOAT_EXPORTBrancherHandle assign(Homehome,FloatVarx,FloatAssignvals, FloatVarValPrintvvp=NULL); } #endif //IFDEF:GECODE_HAS_FLOAT_VARS //STATISTICS:float-post