distinct.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 #ifndef __GECODE_SET_ATMOSTONE_HH__
00023 #define __GECODE_SET_ATMOSTONE_HH__
00024
00025 #include "gecode/set.hh"
00026 #include "gecode/set/distinct/binomial.icc"
00027
00028 namespace Gecode { namespace Set { namespace Distinct {
00029
00042 class AtmostOne :
00043 public NaryPropagator<SetView, PC_SET_ANY> {
00044 protected:
00046 unsigned int c;
00048 AtmostOne(Space* home, bool share,AtmostOne& p);
00050 AtmostOne(Space* home,ViewArray<SetView>&,unsigned int);
00051 public:
00053 GECODE_SET_EXPORT virtual Actor* copy(Space* home, bool);
00055 GECODE_SET_EXPORT virtual ExecStatus propagate(Space* home);
00057 static ExecStatus post(Space* home,ViewArray<SetView> x,unsigned int c);
00058 };
00059
00067 class Distinct :
00068 public NaryPropagator<SetView, PC_SET_ANY> {
00069 protected:
00071 Binomial bin;
00073 unsigned int c;
00075 Distinct(Space* home, bool share,Distinct& p);
00077 Distinct(Space* home,ViewArray<SetView>&,unsigned int);
00078 public:
00080 GECODE_SET_EXPORT virtual Actor* copy(Space* home, bool);
00082 GECODE_SET_EXPORT virtual ExecStatus propagate(Space* home);
00084 static ExecStatus post(Space* home,ViewArray<SetView> x,unsigned int c);
00086 virtual size_t dispose(Space* home);
00087 };
00088
00089
00090 }}}
00091
00092 #include "gecode/set/distinct/atmostOne.icc"
00093 #include "gecode/set/distinct/distinct.icc"
00094
00095 #endif
00096
00097