sortedness.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 #ifndef __GECODE_INT_SORTEDNESS_HH__
00024 #define __GECODE_INT_SORTEDNESS_HH__
00025
00026
00027 #include "gecode/int.hh"
00028 #include "gecode/int/rel.hh"
00029
00035 namespace Gecode { namespace Int { namespace Sortedness {
00036
00053 template<class View, class Tuple, bool Perm>
00054 class Sortedness : public Propagator {
00055 protected:
00056
00069 ViewArray<Tuple> xz;
00070
00072 ViewArray<View> y;
00074 ViewArray<View> w;
00076 int reachable;
00078 Sortedness(Space*, ViewArray<Tuple>&, ViewArray<View>&);
00080 Sortedness(Space* home, bool share, Sortedness<View, Tuple, Perm>& p);
00081
00082 public:
00084 virtual size_t dispose(Space* home);
00086 virtual Actor* copy(Space* home, bool share);
00088 virtual PropCost cost (void) const;
00090 virtual ExecStatus propagate(Space* home);
00092 static ExecStatus post(Space*, ViewArray<Tuple>&, ViewArray<View>&);
00093 };
00094
00095
00096 }}}
00097
00098 #include "gecode/int/sortedness/sortsup.icc"
00099 #include "gecode/int/sortedness/order.icc"
00100 #include "gecode/int/sortedness/matching.icc"
00101 #include "gecode/int/sortedness/narrowing.icc"
00102 #include "gecode/int/sortedness/sortedness.icc"
00103
00104 #endif
00105
00106
00107
00108