precede.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
00042 #ifndef __GECODE_INT_PRECEDE_HH__
00043 #define __GECODE_INT_PRECEDE_HH__
00044
00045 #include <gecode/int.hh>
00046
00052 namespace Gecode { namespace Int { namespace Precede {
00053
00064 template<class View>
00065 class Single : public NaryPropagator<View,PC_INT_NONE> {
00066 protected:
00067 using NaryPropagator<View,PC_INT_NONE>::x;
00069 class Index : public Advisor {
00070 public:
00072 int i;
00074 Index(Space& home, Propagator& p, Council<Index>& c, int i);
00076 Index(Space& home, bool share, Index& a);
00077 };
00079 Council<Index> c;
00081 int s, t;
00083 int alpha, beta, gamma;
00085 ExecStatus updateAlpha(Space& home);
00087 ExecStatus updateBeta(Space& home);
00089 Single(Home home, ViewArray<View>& x, int s, int t, int beta, int gamma);
00091 Single(Space& home, bool share, Single<View>& p);
00092 public:
00094 virtual Propagator* copy(Space& home, bool share);
00096 virtual PropCost cost(const Space&, const ModEventDelta&) const;
00098 virtual size_t dispose(Space& home);
00100 virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
00102 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00104 static ExecStatus post(Home home, ViewArray<View>& x, int s, int t);
00105 };
00106
00107 }}}
00108
00109 #include <gecode/int/precede/single.hpp>
00110
00111 #endif
00112
00113