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

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: 2006-05-29 09:42:21 +0200 (Mon, 29 May 2006) $ by $Author: schulte $
00012  *     $Revision: 3246 $
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 "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 // STATISTICS: set-prop
00113