cumulatives.hh
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __GECODE_INT_CUMULATIVES_HH__
00035 #define __GECODE_INT_CUMULATIVES_HH__
00036
00037 #include <gecode/int.hh>
00038
00039 namespace Gecode { namespace Int { namespace Cumulatives {
00040
00085 template<class ViewM, class ViewP, class ViewU, class View>
00086 class Val : public Propagator {
00087 protected:
00088 ViewArray<ViewM> m;
00089 ViewArray<View> s;
00090 ViewArray<ViewP> p;
00091 ViewArray<View> e;
00092 ViewArray<ViewU> u;
00093 SharedArray<int> c;
00094 const bool at_most;
00095
00096 Val(Space& home, Val<ViewM, ViewP, ViewU, View>& p);
00097 Val(Home home, const ViewArray<ViewM>&, const ViewArray<View>&,
00098 const ViewArray<ViewP>&, const ViewArray<View>&,
00099 const ViewArray<ViewU>&, const SharedArray<int>&, bool);
00100
00101 ExecStatus prune(Space& home, int low, int up, int r,
00102 int ntask, int su,
00103 int* contribution,
00104 int* prune_tasks, int& prune_tasks_size);
00105 public:
00107 virtual Actor* copy(Space& home);
00109 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
00111 virtual void reschedule(Space& home);
00113 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00115 static ExecStatus post(Home home, const ViewArray<ViewM>&,
00116 const ViewArray<View>&, const ViewArray<ViewP>&,
00117 const ViewArray<View>&, const ViewArray<ViewU>&,
00118 const SharedArray<int>&, bool);
00120 virtual size_t dispose(Space& home);
00121 };
00122
00123
00124 }}}
00125
00126 #include <gecode/int/cumulatives/val.hpp>
00127
00128 #endif
00129
00130
00131