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

branch.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  *  Contributing authors:
00007  *     Gabor Szokoli <szokoli@gecode.org>
00008  *
00009  *  Copyright:
00010  *     Guido Tack, 2004
00011  *     Christian Schulte, 2004
00012  *     Gabor Szokoli, 2004
00013  *
00014  *  Last modified:
00015  *     $Date: 2006-07-18 15:39:20 +0200 (Tue, 18 Jul 2006) $ by $Author: schulte $
00016  *     $Revision: 3390 $
00017  *
00018  *  This file is part of Gecode, the generic constraint
00019  *  development environment:
00020  *     http://www.gecode.org
00021  *
00022  *  See the file "LICENSE" for information on usage and
00023  *  redistribution of this file, and for a
00024  *     DISCLAIMER OF ALL WARRANTIES.
00025  *
00026  */
00027 
00028 #ifndef __GECODE_SET_BRANCH_HH__
00029 #define __GECODE_SET_BRANCH_HH__
00030 
00031 #include "gecode/set.hh"
00032 #include "gecode/iter.hh"
00033 
00039 namespace Gecode { namespace Set { namespace Branch {
00040 
00041   /*
00042    * Value selection classes
00043    *
00044    */
00045 
00046 
00054   class ValMin {
00055   public:
00057     int val(const Space* home, SetView x) const;
00059     ModEvent tell(Space* home, unsigned int a, SetView x, int v);
00060   };
00061 
00069   class ValMax {
00070   public:
00072     int val(const Space* home, SetView x) const;
00074     ModEvent tell(Space* home, unsigned int a, SetView x, int v);
00075   };
00076 
00078   template <class SelView>
00079   static void
00080   create(Space* home, ViewArray<SetView>&, SetBvalSel);
00081 
00082   /*
00083    * View selection classes
00084    *
00085    */
00086 
00093   class ByNone {
00094   public:
00096     ViewSelStatus init(const Space* home, SetView x);
00098     ViewSelStatus select(const Space* home, SetView x);
00099   };
00100 
00107   class ByMinCard {
00108   private:
00110     unsigned int minCard;
00111   public:
00113     ViewSelStatus init(const Space* home, SetView x);
00115     ViewSelStatus select(const Space* home, SetView x);
00116   };
00117 
00124   class ByMaxCard {
00125   private:
00127     unsigned int maxCard;
00128   public:
00130     ViewSelStatus init(const Space* home, SetView x);
00132     ViewSelStatus select(const Space* home, SetView x);
00133   };
00134 
00141   class ByMinUnknown {
00142   private:
00144     int minUnknown;
00145   public:
00147     ViewSelStatus init(const Space* home, SetView x);
00149     ViewSelStatus select(const Space* home, SetView x);
00150   };
00151 
00158   class ByMaxUnknown {
00159   private:
00161     int maxUnknown;
00162   public:
00164     ViewSelStatus init(const Space* home, SetView x);
00166     ViewSelStatus select(const Space* home, SetView x);
00167   };
00168 
00169 }}}
00170 
00171 #include "gecode/set/branch/select-val.icc"
00172 #include "gecode/set/branch/select-view.icc"
00173 
00174 #endif
00175 // STATISTICS: set-branch
00176