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

imp-hdr.icc

Go to the documentation of this file.
00001 /*
00002  *  CAUTION:
00003  *    This file has been automatically generated.
00004  *    Do not edit, edit the file "../trunk/gecode/set/var-imp.vis" instead.
00005  *
00006  *  This file contains generated code fragments which are 
00007  *  copyrighted as follows:
00008  *
00009  *  Main author:
00010  *     Christian Schulte <schulte@gecode.org>
00011  *
00012  *  Copyright:
00013  *     Christian Schulte, 2006
00014  *
00015  *  The generated code fragments are part of Gecode, the generic
00016  *  constraint development environment:
00017  *     http://www.gecode.org
00018  *
00019  *  See the file "LICENSE" for information on usage and
00020  *  redistribution of this file, and for a
00021  *     DISCLAIMER OF ALL WARRANTIES.
00022  *
00023  */
00024 
00025 
00026 namespace Gecode { namespace Set {
00027 
00034 
00035   const Gecode::ModEvent ME_SET_FAILED = Gecode::ME_GEN_FAILED;
00036 
00038   const Gecode::ModEvent ME_SET_NONE = Gecode::ME_GEN_NONE;
00039 
00041   const Gecode::ModEvent ME_SET_VAL = Gecode::ME_GEN_ASSIGNED;
00042 
00048   const Gecode::ModEvent ME_SET_CARD = Gecode::ME_GEN_ASSIGNED + 1;
00049 
00057   const Gecode::ModEvent ME_SET_LUB = Gecode::ME_GEN_ASSIGNED + 2;
00058 
00066   const Gecode::ModEvent ME_SET_GLB = Gecode::ME_GEN_ASSIGNED + 3;
00067 
00075   const Gecode::ModEvent ME_SET_BB = Gecode::ME_GEN_ASSIGNED + 4;
00076 
00083   const Gecode::ModEvent ME_SET_CLUB = Gecode::ME_GEN_ASSIGNED + 5;
00084 
00091   const Gecode::ModEvent ME_SET_CGLB = Gecode::ME_GEN_ASSIGNED + 6;
00092 
00104   const Gecode::ModEvent ME_SET_CBB = Gecode::ME_GEN_ASSIGNED + 7;
00105 
00113   const Gecode::PropCond PC_SET_VAL = Gecode::PC_GEN_ASSIGNED;
00114 
00123   const Gecode::PropCond PC_SET_CARD = Gecode::PC_GEN_ASSIGNED + 1;
00124 
00135   const Gecode::PropCond PC_SET_CLUB = Gecode::PC_GEN_ASSIGNED + 2;
00136 
00147   const Gecode::PropCond PC_SET_CGLB = Gecode::PC_GEN_ASSIGNED + 3;
00148 
00158   const Gecode::PropCond PC_SET_ANY = Gecode::PC_GEN_ASSIGNED + 4;
00159 
00161 
00163   class SetMeDiff {
00164   private:
00165     GECODE_SET_EXPORT static const Gecode::ModEvent med[ME_SET_CBB+1][ME_SET_CBB+1];
00166   public:
00168     ModEvent operator()(ModEvent me1, ModEvent me2) const;
00169   };
00170 
00172   class SetVarImpBase : public Gecode::Variable<VTI_SET,PC_SET_ANY,SetMeDiff> {
00173   protected:
00175     class Processor : public Gecode::VarTypeProcessor<VTI_SET,PC_SET_ANY,SetMeDiff> {
00176     public:
00178       GECODE_SET_EXPORT virtual void process(Space* home, VarBase* x);
00179     };
00181     GECODE_SET_EXPORT static Processor p;
00183     SetVarImpBase(Space* home, bool share, SetVarImpBase& x);
00184   public:
00186     SetVarImpBase(Space* home);
00188 
00189 
00201     void subscribe(Space* home, Propagator* p, PropCond pc, bool assigned, bool process);
00203     void notify(Space* home, ModEvent me);
00205 
00206 
00207   };
00208 
00209 
00210   forceinline ModEvent
00211   SetMeDiff::operator()(ModEvent me1, ModEvent me2) const {
00212     return med[me1][me2];
00213   }
00214 
00215   forceinline
00216   SetVarImpBase::SetVarImpBase(Space* home)
00217     : Gecode::Variable<VTI_SET,PC_SET_ANY,SetMeDiff>(home) {}
00218 
00219   forceinline
00220   SetVarImpBase::SetVarImpBase(Space* home, bool share, SetVarImpBase& x)
00221     : Gecode::Variable<VTI_SET,PC_SET_ANY,SetMeDiff>(home,share,x) {}
00222 
00223   forceinline void
00224   SetVarImpBase::subscribe(Space* home, Propagator* p, PropCond pc, bool assigned, bool process) {
00225     Gecode::Variable<VTI_SET,PC_SET_ANY,SetMeDiff>::subscribe(home,p,pc,assigned,ME_SET_CBB,process);
00226   }
00227 
00228   forceinline void
00229   SetVarImpBase::notify(Space* home, ModEvent me) {
00230     Gecode::Variable<VTI_SET,PC_SET_ANY,SetMeDiff>::notify(home,me);
00231   }
00232 
00233 }}
00234 
00235 // STATISTICS: set-var