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
00035
00036
00037
00038
00039
00040
00041 #ifndef __GECODE_INT_CUMULATIVES_HH__
00042 #define __GECODE_INT_CUMULATIVES_HH__
00043
00044 #include "gecode/int.hh"
00045
00046 namespace Gecode { namespace Int { namespace Cumulatives {
00047
00092 template <class ViewM, class ViewD, class ViewH, class View>
00093 class Val : public Propagator {
00094 ViewArray<ViewM> machine;
00095 ViewArray<View> start;
00096 ViewArray<ViewD> duration;
00097 ViewArray<View> end;
00098 ViewArray<ViewH> height;
00099 SharedArray<int> limit;
00100 const bool at_most;
00101
00102 Val(Space* home, bool share, Val<ViewM, ViewD, ViewH, View>& p);
00103 Val(Space* home, const ViewArray<ViewM>&, const ViewArray<View>&,
00104 const ViewArray<ViewD>&, const ViewArray<View>&,
00105 const ViewArray<ViewH>&, const IntArgs&, bool);
00106
00107 ExecStatus prune(Space * home, int low, int up, int r,
00108 int ntask, int sheight,
00109 int* contribution,
00110 int* prune_tasks, int& prune_tasks_size);
00111 public:
00112 virtual size_t dispose(Space* home);
00113 virtual Actor* copy(Space* home, bool share);
00114 virtual PropCost cost(ModEventDelta med) const;
00115 virtual ExecStatus propagate(Space* home, ModEventDelta med);
00117 virtual Reflection::ActorSpec spec(const Space* home,
00118 Reflection::VarMap& m) const;
00120 static void post(Space* home, Reflection::VarMap& vars,
00121 const Reflection::ActorSpec& spec);
00123 static Support::Symbol ati(void);
00124 static ExecStatus post(Space* home, const ViewArray<ViewM>&,
00125 const ViewArray<View>&, const ViewArray<ViewD>&,
00126 const ViewArray<View>&, const ViewArray<ViewH>&,
00127 const IntArgs&, bool);
00128 };
00129
00130
00131 }}}
00132
00133 #include "gecode/int/cumulatives/val.icc"
00134
00135 #endif
00136
00137
00138