sorted.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 #ifndef __GECODE_INT_SORTED_HH__
00040 #define __GECODE_INT_SORTED_HH__
00041
00042 #include <gecode/int.hh>
00043
00049 namespace Gecode { namespace Int { namespace Sorted {
00050
00062 template<class View, bool Perm>
00063 class Sorted : public Propagator {
00064 protected:
00066 ViewArray<View> x;
00068 ViewArray<View> y;
00070 ViewArray<View> z;
00072 ViewArray<View> w;
00074 int reachable;
00076 Sorted(Space&, ViewArray<View>& x, ViewArray<View>& y, ViewArray<View>& z);
00078 Sorted(Space& home, bool share, Sorted<View,Perm>& p);
00079 public:
00081 virtual size_t dispose(Space& home);
00083 virtual Actor* copy(Space& home, bool share);
00085 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
00087 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
00089 static ExecStatus post(Space&, ViewArray<View>& x, ViewArray<View>& y,
00090 ViewArray<View>& z);
00091 };
00092
00093
00094 }}}
00095
00096 #include <gecode/int/sorted/sortsup.hpp>
00097 #include <gecode/int/sorted/order.hpp>
00098 #include <gecode/int/sorted/matching.hpp>
00099 #include <gecode/int/sorted/narrowing.hpp>
00100 #include <gecode/int/sorted/propagate.hpp>
00101
00102 #endif
00103
00104
00105
00106