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

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: 2006-08-04 16:03:26 +0200 (Fri, 04 Aug 2006) $ by $Author: schulte $
00010  *     $Revision: 3512 $
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 "gecode/int.hh"
00026 #include "gecode/support/sort.hh"
00027 #include "gecode/support/static-stack.hh"
00028 #include "gecode/int/gcc/gccbndsup.icc"
00029 #include "gecode/int/gcc/graphsup.icc"
00030 #include "gecode/int/gcc/occur.icc"
00031 
00040 namespace Gecode { namespace Int { namespace GCC {
00041 
00093   template <class View, class Card, bool isView>
00094   class Bnd{
00095   public:
00103     static  ExecStatus  post(Space* home,
00104                              ViewArray<View>& x,
00105                              ViewArray<Card>& k,
00106                              bool all);
00107   };
00108 
00113   template <class View, class Card, bool isView, bool shared>
00114   class BndImp : public Propagator {
00115     friend class Bnd<View, Card, isView>;
00116   protected:
00118     ViewArray<View> x;
00120     ViewArray<Card> k;
00126     PartialSum<Card>* lps;
00128     PartialSum<Card>* ups;
00135     bool card_fixed;
00140     bool card_all;
00146     bool skip_lbc;
00148     BndImp(Space* home, ViewArray<View>&, ViewArray<Card>&, bool, bool, bool);
00150     BndImp(Space* home, bool share, BndImp<View, Card, isView, shared>& p);
00151 
00152   public:
00154     virtual size_t dispose(Space* home);
00156     virtual void flush(void);
00158     virtual Actor* copy(Space* home, bool share);
00160     virtual PropCost    cost (void) const;
00162     virtual ExecStatus  propagate(Space* home);
00163   };
00164 
00174   template <class View, class Card, bool isView, bool shared>
00175   ExecStatus prop_bnd(Space* home, ViewArray<View>&, ViewArray<Card>&,
00176                       PartialSum<Card>*&, PartialSum<Card>*&,
00177                       bool, bool, bool);
00178 
00205   template <class View, class Card, bool isView>
00206   class Dom : public Propagator {
00207   protected:
00209     ViewArray<View> x;
00214     ViewArray<View> y;
00216     ViewArray<Card> k;
00218     VarValGraph<View, Card, isView>* vvg;
00225     bool card_fixed;
00230     bool card_all;
00232     Dom(Space* home, bool share, Dom<View, Card, isView>& p);
00234     Dom(Space* home, ViewArray<View>&, ViewArray<Card>&, bool, bool);
00235 
00236   public:
00238     virtual size_t dispose(Space* home);
00240     virtual void flush(void);
00242     virtual Actor* copy(Space* home, bool share);
00255     virtual PropCost    cost (void) const;
00257     virtual ExecStatus  propagate(Space* home);
00264     static  ExecStatus  post(Space* home,
00265                              ViewArray<View>& x, ViewArray<Card>& k,
00266                              bool all);
00267   };
00268 
00277   template <class View, class Card, bool isView>
00278   class Val : public Propagator {
00279   protected:
00281     ViewArray<View> x;
00283     ViewArray<Card> k;
00288     bool card_all;
00290     Val(Space* home, bool share, Val<View, Card, isView>& p );
00292     Val(Space* home, ViewArray<View>&, ViewArray<Card>&, bool);
00293 
00294   public:
00296     virtual size_t dispose(Space* home);
00298     virtual Actor* copy(Space* home, bool share);
00300     virtual PropCost    cost (void) const;
00302     virtual ExecStatus  propagate(Space* home);
00309     static  ExecStatus  post(Space* home,
00310                              ViewArray<View>& x, ViewArray<Card>& k,
00311                              bool all);
00312   };
00313 
00322   template <class View, class Card, bool isView>
00323   ExecStatus prop_val(Space* home, ViewArray<View>&, ViewArray<Card>&,
00324                       bool&);
00325 
00326 }}}
00327 
00328 #include "gecode/int/gcc/ubc.icc"
00329 #include "gecode/int/gcc/lbc.icc"
00330 #include "gecode/int/gcc/val.icc"
00331 #include "gecode/int/gcc/bnd.icc"
00332 #include "gecode/int/gcc/dom.icc"
00333 
00334 #endif
00335 
00336 
00337 // STATISTICS: int-prop
00338