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

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: 2005-08-05 09:40:23 +0200 (Fri, 05 Aug 2005) $ by $Author: tack $
00016  *     $Revision: 2138 $
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 "set.hh"
00032 #include "iter.hh"
00033 
00034 namespace Gecode { namespace Set { namespace Branch {
00035 
00036   /*
00037    * Value selection classes
00038    *
00039    */
00040 
00041 
00049   class ValMin {
00050   public:
00052     int val(SetView x);
00054     ModEvent tell(Space* home, unsigned int a, SetView x, int v);
00055   };
00056 
00064   class ValMax {
00065   public:
00067     int val(SetView x);
00069     ModEvent tell(Space* home, unsigned int a, SetView x, int v);
00070   };
00071 
00073   template <class SelView>
00074   static void
00075   create(Space* home, ViewArray<SetView>&, SetBvalSel);
00076 
00077   /*
00078    * View selection classes
00079    *
00080    */
00081 
00088   class ByNone {
00089   public:
00091     ViewSelStatus init(SetView);
00093     ViewSelStatus select(SetView);
00094   };
00095 
00102   class ByMinCard {
00103   private:
00105     unsigned int minCard;
00106   public:
00108     ViewSelStatus init(SetView x);
00110     ViewSelStatus select(SetView x);
00111   };
00112 
00119   class ByMaxCard {
00120   private:
00122     unsigned int maxCard;
00123   public:
00125     ViewSelStatus init(SetView x);
00127     ViewSelStatus select(SetView x);
00128   };
00129 
00136   class ByMinUnknown {
00137   private:
00139     int minUnknown;
00140   public:
00142     ViewSelStatus init(SetView x);
00144     ViewSelStatus select(SetView x);
00145   };
00146 
00153   class ByMaxUnknown {
00154   private:
00156     int maxUnknown;
00157   public:
00159     ViewSelStatus init(SetView x);
00161     ViewSelStatus select(SetView x);
00162   };
00163 
00164 }}}
00165 
00166 #include "set/branch/select-val.icc"
00167 #include "set/branch/select-view.icc"
00168 
00169 #endif
00170 // STATISTICS: set-branch
00171