Generated on Wed Jan 4 17:49:09 2006 for Gecode by doxygen 1.4.6

distinct.hh

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Guido Tack, 2004
00007  *
00008  *  Last modified:
00009  *     $Date: 2005-11-25 17:31:45 +0100 (Fri, 25 Nov 2005) $ by $Author: tack $
00010  *     $Revision: 2652 $
00011  *
00012  *  This file is part of Gecode, the generic constraint
00013  *  development environment:
00014  *     http://www.gecode.org
00015  *
00016  *  See the file "LICENSE" for information on usage and
00017  *  redistribution of this file, and for a
00018  *     DISCLAIMER OF ALL WARRANTIES.
00019  *
00020  */
00021 
00022 #ifndef __GECODE_SET_ATMOSTONE_HH__
00023 #define __GECODE_SET_ATMOSTONE_HH__
00024 
00025 #include "set.hh"
00026 #include "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);
00085   };
00086 
00087 
00088 }}}
00089 
00090 #include "set/distinct/atmostOne.icc"
00091 #include "set/distinct/distinct.icc"
00092 
00093 #endif
00094 
00095 // STATISTICS: set-prop