Generated on Sun Aug 26 2012 08:42:59 for Gecode by doxygen 1.8.1.1
gcc.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Patrick Pekczynski <pekczynski@ps.uni-sb.de>
5  *
6  * Contributing authors:
7  * Christian Schulte <schulte@gecode.org>
8  * Guido Tack <tack@gecode.org>
9  *
10  * Copyright:
11  * Patrick Pekczynski, 2004/2005
12  * Christian Schulte, 2009
13  * Guido Tack, 2009
14  *
15  * Last modified:
16  * $Date: 2009-10-13 02:36:53 +1100 (Tue, 13 Oct 2009) $ by $Author: schulte $
17  * $Revision: 9878 $
18  *
19  * This file is part of Gecode, the generic constraint
20  * development environment:
21  * http://www.gecode.org
22  *
23  * Permission is hereby granted, free of charge, to any person obtaining
24  * a copy of this software and associated documentation files (the
25  * "Software"), to deal in the Software without restriction, including
26  * without limitation the rights to use, copy, modify, merge, publish,
27  * distribute, sublicense, and/or sell copies of the Software, and to
28  * permit persons to whom the Software is furnished to do so, subject to
29  * the following conditions:
30  *
31  * The above copyright notice and this permission notice shall be
32  * included in all copies or substantial portions of the Software.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41  *
42  */
43 
44 #ifndef __GECODE_INT_GCC_HH__
45 #define __GECODE_INT_GCC_HH__
46 
47 #include <gecode/int.hh>
48 
54 #include <gecode/int/gcc/view.hpp>
57 
58 namespace Gecode { namespace Int { namespace GCC {
59 
66  template<class Card>
67  class Val : public Propagator {
68  protected:
76  Val(Space& home, bool share, Val<Card>& p);
77  public:
79  virtual Actor* copy(Space& home, bool share);
81  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
83  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
85  virtual size_t dispose(Space& home);
87  static ExecStatus post(Home home,
89  };
90 
114  template<class Card>
115  class Bnd : public Propagator {
116  protected:
143  bool skip_lbc;
145  Bnd(Space& home, bool share, Bnd<Card>& p);
146 
148  ExecStatus pruneCards(Space& home);
149 
168  ExecStatus lbc(Space& home, int& nb, HallInfo hall[], Rank rank[],
169  int mu[], int nu[]);
170 
189  ExecStatus ubc(Space& home, int& nb, HallInfo hall[], Rank rank[],
190  int mu[], int nu[]);
192  Bnd(Home home, ViewArray<IntView>&, ViewArray<Card>&, bool, bool);
193  public:
195  virtual Actor* copy(Space& home, bool share);
197  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
199  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
201  virtual size_t dispose(Space& home);
203  static ExecStatus post(Home home,
205  };
206 
218  template<class Card>
219  class Dom : public Propagator {
220  protected:
240  Dom(Space& home, bool share, Dom<Card>& p);
242  Dom(Home home, ViewArray<IntView>&, ViewArray<Card>&, bool);
243  public:
245  virtual Actor* copy(Space& home, bool share);
247  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
249  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
251  virtual size_t dispose(Space& home);
253  static ExecStatus post(Home home,
255  };
256 
257 }}}
258 
259 #include <gecode/int/gcc/post.hpp>
260 #include <gecode/int/gcc/val.hpp>
261 #include <gecode/int/gcc/bnd.hpp>
262 #include <gecode/int/gcc/dom.hpp>
263 
264 #endif
265 
266 
267 // STATISTICS: int-prop
268