select.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 #ifndef __GECODE_SET_SELECT_HH__
00025 #define __GECODE_SET_SELECT_HH__
00026
00027 #include "gecode/set.hh"
00028
00029 #include "gecode/set/select/idxarray.hh"
00030 #include "gecode/set/rel.hh"
00031 #include "gecode/set/rel-op.hh"
00032
00033 namespace Gecode { namespace Set { namespace Select {
00034
00046 template <class SView, class RView>
00047 class SelectIntersection :
00048 public Propagator {
00049 protected:
00050 IntSet universe;
00051 SView x0;
00052 IdxViewArray<SView> iv;
00053 RView x1;
00054
00056 SelectIntersection(Space* home, bool share,SelectIntersection& p);
00058 SelectIntersection(Space* home,SView,IdxViewArray<SView>&,RView,
00059 const IntSet& universe);
00060 public:
00062 virtual Actor* copy(Space* home,bool);
00063 virtual PropCost cost(void) const;
00065 virtual size_t dispose(Space* home);
00067 virtual ExecStatus propagate(Space* home);
00073 static ExecStatus post(Space* home,SView z,IdxViewArray<SView>& x,
00074 RView y, const IntSet& u);
00075 };
00076
00083 class SelectDisjoint :
00084 public Propagator {
00085 protected:
00086 IdxViewArray<SetView> iv;
00087 SetView x1;
00088
00090 SelectDisjoint(Space* home, bool share,SelectDisjoint& p);
00092 SelectDisjoint(Space* home,IdxViewArray<SetView>&,SetView);
00093 public:
00095 GECODE_SET_EXPORT virtual Actor* copy(Space* home,bool);
00096 GECODE_SET_EXPORT virtual PropCost cost(void) const;
00098 GECODE_SET_EXPORT virtual size_t dispose(Space* home);
00100 GECODE_SET_EXPORT virtual ExecStatus propagate(Space* home);
00102 static ExecStatus post(Space* home,IdxViewArray<SetView>& x,SetView y);
00103 };
00104
00105 }}}
00106
00107 #include "gecode/set/select/inter.icc"
00108 #include "gecode/set/select/disjoint.icc"
00109
00110 #endif
00111
00112
00113