task.hh gecode/int.hh gecode/int/task/man-to-opt.hpp gecode/int/task/fwd-to-bwd.hpp gecode/int/task/array.hpp gecode/int/task/sort.hpp gecode/int/task/iter.hpp gecode/int/task/tree.hpp gecode/int/task/prop.hpp gecode/int/task/purge.hpp /usr/include/gecode/int/cumulative.hh /usr/include/gecode/int/unary.hh Gecode::Int::ManToOptTask Gecode::Int::FwdToBwd Gecode::Int::TaskViewTraits Gecode::Int::TaskTraits Gecode::Int::TaskArray Gecode::Int::TaskViewArray Gecode::Int::TaskViewIter Gecode::Int::ManTaskViewIter Gecode::Int::TaskTree Gecode::Int::TaskProp Gecode Gecode::Int /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *ChristianSchulte<schulte@gecode.org> * *Copyright: *ChristianSchulte,2009 * *Lastmodified: *$Date:2013-03-1106:26:07+0100(Mon,11Mar2013)$by$Author:tack$ *$Revision:13487$ * *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_TASK_HH__ #define__GECODE_INT_TASK_HH__ #include<gecode/int.hh> namespaceGecode{namespaceInt{ template<classManTask> classManToOptTask:publicManTask{ protected: Int::BoolView_m; public: ManToOptTask(void); boolmandatory(void)const; boolexcluded(void)const; booloptional(void)const; boolassigned(void)const; ModEventmandatory(Space&home); ModEventexcluded(Space&home); voidupdate(Space&home,boolshare,ManToOptTask&t); voidsubscribe(Space&home,Propagator&p,PropCondpc); voidcancel(Space&home,Propagator&p,PropCondpc); }; }} #include<gecode/int/task/man-to-opt.hpp> namespaceGecode{namespaceInt{ template<classTaskView> classFwdToBwd:publicTaskView{ public: intest(void)const; intect(void)const; intlst(void)const; intlct(void)const; intpmin(void)const; intpmax(void)const; ModEventest(Space&home,intn); ModEventect(Space&home,intn); ModEventlst(Space&home,intn); ModEventlct(Space&home,intn); ModEventnorun(Space&home,inte,intl); }; }} #include<gecode/int/task/fwd-to-bwd.hpp> namespaceGecode{namespaceInt{ template<classTaskView> classTaskViewTraits{}; template<classTask> classTaskTraits{}; }} namespaceGecode{namespaceInt{ template<classTask> classTaskArray{ private: intn; Task*t; public: TaskArray(void); TaskArray(Space&home,intn); TaskArray(constTaskArray<Task>&a); constTaskArray<Task>&operator =(constTaskArray<Task>&a); intsize(void)const; voidsize(intn); Task&operator [](inti); constTask&operator [](inti)const; voidsubscribe(Space&home,Propagator&p,PropCondpc=Int::PC_INT_BND); voidcancel(Space&home,Propagator&p,PropCondpc=Int::PC_INT_BND); voidupdate(Space&,boolshare,TaskArray&a); private: staticvoid*operatornew(size_t); staticvoidoperatordelete(void*,size_t); }; template<classChar,classTraits,classTask> std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>&os, constTaskArray<Task>&t); template<classTaskView> classTaskViewArray{ protected: typedeftypenameTaskViewTraits<TaskView>::TaskTask; TaskArray<Task>&t; public: TaskViewArray(TaskArray<Task>&t); intsize(void)const; voidsize(intn); TaskView&operator [](inti); constTaskView&operator [](inti)const; private: staticvoid*operatornew(size_t); staticvoidoperatordelete(void*,size_t); }; template<classChar,classTraits,classTaskView> std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>&os, constTaskViewArray<TaskView>&t); }} #include<gecode/int/task/array.hpp> namespaceGecode{namespaceInt{ enumSortTaskOrder{ STO_EST, STO_ECT, STO_LST, STO_LCT }; template<classTaskView,SortTaskOrdersto,boolinc> voidsort(TaskViewArray<TaskView>&t); template<classTaskView,SortTaskOrdersto,boolinc> voidsort(int*map,constTaskViewArray<TaskView>&t); template<classTaskView,SortTaskOrdersto,boolinc> voidsort(int*map,intn,constTaskViewArray<TaskView>&t); }} #include<gecode/int/task/sort.hpp> namespaceGecode{namespaceInt{ template<classTaskView,SortTaskOrdersto,boolinc> classTaskViewIter{ protected: int*map; inti; TaskViewIter(void); public: TaskViewIter(Region&r,constTaskViewArray<TaskView>&t); booloperator ()(void)const; intleft(void)const; voidoperator ++(void); inttask(void)const; }; template<classOptTaskView,SortTaskOrdersto,boolinc> classManTaskViewIter:publicTaskViewIter<OptTaskView,sto,inc>{ protected: usingTaskViewIter<OptTaskView,sto,inc>::map; usingTaskViewIter<OptTaskView,sto,inc>::i; public: ManTaskViewIter(Region&r,constTaskViewArray<OptTaskView>&t); }; }} #include<gecode/int/task/iter.hpp> namespaceGecode{namespaceInt{ intplus(intx,inty); longlongintplus(longlongintx,longlonginty); doubleplus(doublex,doubley); template<classTaskView,classNode> classTaskTree{ template<class,class>friendclassTaskTree; protected: constTaskViewArray<TaskView>&tasks; Node*node; int*_leaf; intn_inner(void)const; intn_nodes(void)const; staticbooln_root(inti); booln_leaf(inti)const; staticintn_left(inti); staticboolleft(inti); staticintn_right(inti); staticboolright(inti); staticintn_parent(inti); protected: Node&leaf(inti); constNode&root(void)const; voidupdate(inti,booll=true); voidinit(void); voidupdate(void); TaskTree(Region&r,constTaskViewArray<TaskView>&t); template<classNode2>TaskTree(Region&r, constTaskTree<TaskView,Node2>&t); }; }} #include<gecode/int/task/tree.hpp> namespaceGecode{namespaceInt{ template<classTask,PropCondpc> classTaskProp:publicPropagator{ protected: TaskArray<Task>t; TaskProp(Homehome,TaskArray<Task>&t); TaskProp(Space&home,boolshared,TaskProp<Task,pc>&p); public: virtualPropCostcost(constSpace&home,constModEventDelta&med)const; virtualsize_tdispose(Space&home); }; template<classOptTask,PropCondpc> ExecStatuspurge(Space&home,Propagator&p,TaskArray<OptTask>&t); template<classOptTask,PropCondpc,classCap> ExecStatuspurge(Space&home,Propagator&p,TaskArray<OptTask>&t,Capc); }} #include<gecode/int/task/prop.hpp> #include<gecode/int/task/purge.hpp> #endif //STATISTICS:int-prop