Generated on Wed Nov 1 15:04:33 2006 for Gecode by doxygen 1.4.5

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: 2006-06-19 11:03:38 +0200 (Mon, 19 Jun 2006) $ by $Author: tack $
00010  *     $Revision: 3304 $
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 "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 // STATISTICS: set-prop