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

gcc.hh

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Patrick Pekczynski <pekczynski@ps.uni-sb.de>
00004  *
00005  *  Copyright:
00006  *     Patrick Pekczynski, 2004/2005
00007  *
00008  *  Last modified:
00009  *     $Date: 2005-12-06 07:46:40 +0100 (Tue, 06 Dec 2005) $ by $Author: pekczynski $
00010  *     $Revision: 2696 $
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_INT_GCC_HH__
00023 #define __GECODE_INT_GCC_HH__
00024 
00025 #include "int.hh"
00026 #include "support/sort.hh"
00027 #include "support/static-stack.hh"
00028 #include "int/gcc/gccbndsup.icc" 
00029 #include "int/gcc/graphsup.icc"
00030 #include "int/gcc/occur.icc"
00031 
00038 
00039 typedef Gecode::Int::GCC::OccurArray<
00040   Gecode::Int::GCC::OccurBnds<int, 2> >FixCard;
00042 typedef Gecode::Int::GCC::CardArray<Gecode::Int::GCC::CardView> VarCard;
00044 typedef Gecode::ViewArray<Gecode::Int::GCC::IdxView> GccIdxView;
00045 
00046 namespace Gecode { namespace Int { namespace GCC {
00047 
00048   template <class View, class Card, bool shared, bool isView>
00049   ExecStatus prop_bnd(Space* home, 
00050                       ViewArray<View>&,
00051                       Card&,
00052                       PartialSum<Card>*,
00053                       PartialSum<Card>*);
00054 
00055   template <class View, class Card, bool isView>
00056   ExecStatus prop_val(Space* home, ViewArray<View>&, Card&);
00057 
00110   template <class View, class Card, bool isView>
00111   class Bnd{
00112   public:
00114     static  ExecStatus  post(Space* home, ViewArray<View>&, Card&);
00115   };
00116 
00121   template <class View, class Card, bool isView, bool shared>
00122   class BndImp : public Propagator {
00123     friend class Bnd<View, Card, isView>;
00124   protected:
00125     ViewArray<View> x; 
00126     ViewArray<View> y; 
00127     Card k;
00128     PartialSum<Card>* lps;
00129     PartialSum<Card>* ups;
00130     BndImp(Space* home, bool, BndImp<View, VarCard, isView, shared>&);
00131     BndImp(Space* home, bool, BndImp<View, FixCard, isView, shared>&);
00132     BndImp(Space* home, ViewArray<View>&, Card&);
00133 
00134   public:
00135     virtual ~BndImp(void);
00136     virtual void flush(void);
00137     virtual Actor* copy(Space* home, bool share);
00138     virtual PropCost    cost (void) const;
00139     virtual ExecStatus  propagate(Space* home);
00140   };
00141 
00167   template <class View, class Card, bool isView>
00168   class Dom : public Propagator {
00169   protected:
00170     ViewArray<View> x; 
00171     ViewArray<View> y; 
00172     Card k;
00173     Card l;
00174     VarValGraph<View, Card, isView>* vvg;
00175     Dom(Space* home, bool, Dom<View, VarCard, isView>&);
00176     Dom(Space* home, bool, Dom<View, FixCard, isView>&);
00177     Dom(Space* home, ViewArray<View>&, Card&);
00178 
00179   public:
00180     virtual ~Dom(void);
00181     virtual void flush(void);
00182     virtual Actor* copy(Space* home, bool share);
00183     virtual PropCost    cost (void) const;
00184     virtual ExecStatus  propagate(Space* home);
00185     static  ExecStatus  post(Space* home, 
00186                              ViewArray<View>&, 
00187                              Card&);
00188   };
00189 
00198   template <class View, class Card, bool isView>
00199   class Val : public Propagator {
00200   protected:
00201     ViewArray<View> x;
00202     Card k;
00203     Val(Space* home, bool, Val<View, VarCard, isView>&);
00204     Val(Space* home, bool, Val<View, FixCard, isView>&);
00205     Val(Space* home, ViewArray<View>&, Card&);
00206 
00207   public:
00208     virtual ~Val(void);
00209     virtual Actor* copy(Space* home, bool share);
00210     virtual PropCost    cost (void) const;
00211     virtual ExecStatus  propagate(Space* home);
00212     static  ExecStatus  post(Space* home, ViewArray<View>&, Card&);
00213   };
00214 
00215 }}}
00216 
00217 #include "int/gcc/ubc.icc"
00218 #include "int/gcc/lbc.icc"
00219 #include "int/gcc/val.icc"
00220 #include "int/gcc/bnd.icc"
00221 #include "int/gcc/dom.icc"
00222 
00223 #endif
00224 
00225 
00226 // STATISTICS: int-prop
00227