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

select.hh

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Copyright:
00007  *     Guido Tack, 2004
00008  *     Christian Schulte, 2004
00009  *
00010  *  Last modified:
00011  *     $Date: 2005-11-25 17:31:45 +0100 (Fri, 25 Nov 2005) $ by $Author: tack $
00012  *     $Revision: 2652 $
00013  *
00014  *  This file is part of Gecode, the generic constraint
00015  *  development environment:
00016  *     http://www.gecode.org
00017  *
00018  *  See the file "LICENSE" for information on usage and
00019  *  redistribution of this file, and for a
00020  *     DISCLAIMER OF ALL WARRANTIES.
00021  *
00022  */
00023 
00024 #ifndef __GECODE_SET_SELECT_HH__
00025 #define __GECODE_SET_SELECT_HH__
00026 
00027 #include "set.hh"
00028 
00029 #include "set/select/idxarray.hh"
00030 #include "set/rel.hh"
00031 #include "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;
00064     virtual ~SelectIntersection(void);
00066     virtual ExecStatus  propagate(Space* home);
00072     static  ExecStatus  post(Space* home,SView z,IdxViewArray<SView>& x,
00073                              RView y, const IntSet& u);
00074   };
00075 
00082   class SelectDisjoint :
00083     public Propagator {
00084   protected:
00085     IdxViewArray<SetView> iv;
00086     SetView x1;
00087 
00089     SelectDisjoint(Space* home, bool share,SelectDisjoint& p);
00091     SelectDisjoint(Space* home,IdxViewArray<SetView>&,SetView);
00092   public:
00094     GECODE_SET_EXPORT virtual Actor*      copy(Space* home,bool);
00095     GECODE_SET_EXPORT virtual PropCost    cost(void) const;
00096     GECODE_SET_EXPORT virtual ~SelectDisjoint(void);
00098     GECODE_SET_EXPORT virtual ExecStatus  propagate(Space* home);
00100     static  ExecStatus  post(Space* home,IdxViewArray<SetView>& x,SetView y);
00101   };
00102 
00103 }}}
00104 
00105 #include "set/select/inter.icc"
00106 #include "set/select/disjoint.icc"
00107 
00108 #endif
00109 
00110 // STATISTICS: set-prop
00111