Generated on Thu Jul 25 2019 00:00:00 for Gecode by doxygen 1.8.15
rel.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  * Guido Tack <tack@gecode.org>
6  *
7  * Contributing authors:
8  * Gabor Szokoli <szokoli@gecode.org>
9  *
10  * Copyright:
11  * Christian Schulte, 2002
12  * Guido Tack, 2004
13  * Gabor Szokoli, 2003
14  *
15  * Last modified:
16  * $Date: 2016-11-08 17:23:24 +0100 (Tue, 08 Nov 2016) $ by $Author: schulte $
17  * $Revision: 15253 $
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_REL_HH__
45 #define __GECODE_INT_REL_HH__
46 
47 #include <gecode/int.hh>
48 
54 namespace Gecode { namespace Int { namespace Rel {
55 
56  /*
57  * Equality propagators
58  *
59  */
60 
70  template<class View0,class View1>
71  class EqDom :
72  public MixBinaryPropagator<View0,PC_INT_DOM,View1,PC_INT_DOM> {
73  protected:
76 
78  EqDom(Space& home, bool share, EqDom<View0,View1>& p);
79  public:
81  EqDom(Home home, View0 x0, View1 x1);
83  EqDom(Space& home, bool share, Propagator& p, View0 x0, View1 x1);
85  virtual Actor* copy(Space& home, bool share);
93  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
95  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
97  static ExecStatus post(Home home, View0 x0, View1 x1);
98  };
99 
106  template<class View0, class View1>
107  class EqVal :
108  public MixBinaryPropagator<View0,PC_INT_VAL,View1,PC_INT_VAL> {
109  protected:
112 
114  EqVal(Space& home, bool share, EqVal<View0,View1>& p);
115  public:
117  EqVal(Home home, View0 x0, View1 x1);
119  EqVal(Space& home, bool share, Propagator& p, View0 x0, View1 x1);
121  virtual Actor* copy(Space& home, bool share);
123  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
125  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
127  static ExecStatus post(Home home, View0 x0, View1 x1);
128  };
129 
136  template<class View0, class View1>
137  class EqBnd :
138  public MixBinaryPropagator<View0,PC_INT_BND,View1,PC_INT_BND> {
139  protected:
142 
144  EqBnd(Space& home, bool share, EqBnd<View0,View1>& p);
145  public:
147  EqBnd(Home home, View0 x0, View1 x1);
149  EqBnd(Space& home, bool share, Propagator& p, View0 x0, View1 x1);
151  virtual Actor* copy(Space& home, bool share);
153  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
155  static ExecStatus post(Home home, View0 x0, View1 x1);
156  };
157 
167  template<class View>
168  class NaryEqDom : public NaryPropagator<View,PC_INT_DOM> {
169  protected:
171 
173  NaryEqDom(Space& home, bool share, NaryEqDom<View>& p);
176  public:
178  virtual Actor* copy(Space& home, bool share);
186  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
188  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
190  static ExecStatus post(Home home, ViewArray<View>& x);
191  };
192 
199  template<class View>
200  class NaryEqBnd : public NaryPropagator<View,PC_INT_BND> {
201  protected:
203 
205  NaryEqBnd(Space& home, bool share, NaryEqBnd<View>& p);
208  public:
210  virtual Actor* copy(Space& home, bool share);
217  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
219  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
221  static ExecStatus post(Home home, ViewArray<View>& x);
222  };
223 
233  template<class View, int o>
234  class NaryLqLe : public NaryPropagator<View,PC_INT_NONE> {
235  protected:
238  class Index : public Advisor {
239  public:
241  int i;
243  Index(Space& home, Propagator& p, Council<Index>& c, int i);
245  Index(Space& home, bool share, Index& a);
246  };
250  class Pos : public FreeList {
251  public:
253  int p;
254 
256 
257  Pos(int p, Pos* n);
260 
262 
263  Pos* next(void) const;
266 
268 
269  void dispose(Space& home);
271 
273  static void* operator new(size_t s, Space& home);
275  static void operator delete(void* p);
277  static void operator delete(void* p, Space& home);
279  };
283  bool empty(void) const;
285  int pop(Space& home);
287  void push(Space& home, int p);
289  bool run;
293  static const int n_threshold = 7;
295  NaryLqLe(Space& home, bool share, NaryLqLe<View,o>& p);
297  NaryLqLe(Home home, ViewArray<View>&);
298  public:
300  virtual Actor* copy(Space& home, bool share);
302  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
304  virtual void reschedule(Space& home);
306  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
308  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
310  virtual size_t dispose(Space& home);
312  static ExecStatus post(Home home, ViewArray<View>& x);
313  };
314 
321  template<class View>
322  class NaryNq : public NaryPropagator<View,PC_INT_VAL> {
323  protected:
326  NaryNq(Home home, ViewArray<View>& x);
328  NaryNq(Space& home, bool share, NaryNq<View>& p);
329  public:
331  virtual Actor* copy(Space& home, bool share);
333  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
335  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
337  static ExecStatus post(Home home, ViewArray<View>& x);
339  virtual size_t dispose(Space& home);
340  };
341 
342 
349  template<class View, class CtrlView, ReifyMode rm>
350  class ReEqDom : public ReBinaryPropagator<View,PC_INT_DOM,CtrlView> {
351  protected:
355 
357  ReEqDom(Space& home, bool share, ReEqDom& p);
359  ReEqDom(Home home, View x0, View x1, CtrlView b);
360  public:
362  virtual Actor* copy(Space& home, bool share);
364  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
366  static ExecStatus post(Home home, View x0, View x1, CtrlView b);
367  };
368 
375  template<class View, class CtrlView, ReifyMode rm>
376  class ReEqBnd : public ReBinaryPropagator<View,PC_INT_BND,CtrlView> {
377  protected:
381 
383  ReEqBnd(Space& home, bool share, ReEqBnd& p);
385  ReEqBnd(Home home, View x0, View x1, CtrlView b);
386  public:
388  virtual Actor* copy(Space& home, bool share);
390  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
392  static ExecStatus post(Home home, View x0, View x1, CtrlView b);
393  };
394 
401  template<class View, class CtrlView, ReifyMode rm>
402  class ReEqDomInt : public ReUnaryPropagator<View,PC_INT_DOM,CtrlView> {
403  protected:
406 
408  int c;
410  ReEqDomInt(Space& home, bool share, ReEqDomInt& p);
412  ReEqDomInt(Home home, View x, int c, CtrlView b);
413  public:
415  virtual Actor* copy(Space& home, bool share);
417  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
419  static ExecStatus post(Home home, View x, int c, CtrlView b);
420  };
421 
428  template<class View, class CtrlView, ReifyMode rm>
429  class ReEqBndInt : public ReUnaryPropagator<View,PC_INT_BND,CtrlView> {
430  protected:
433 
435  int c;
437  ReEqBndInt(Space& home, bool share, ReEqBndInt& p);
439  ReEqBndInt(Home home, View x, int c, CtrlView b);
440  public:
442  virtual Actor* copy(Space& home, bool share);
444  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
446  static ExecStatus post(Home home, View x, int c, CtrlView b);
447  };
448 
449 
450 
451 
452  /*
453  * Disequality propagators
454  *
455  */
456 
463  template<class V0, class V1>
464  class Nq : public MixBinaryPropagator<V0,PC_INT_VAL,V1,PC_INT_VAL> {
465  protected:
468 
470  Nq(Space& home, bool share, Nq<V0,V1>& p);
472  Nq(Home home, V0 x0, V1 x1);
473  public:
475  virtual Actor* copy(Space& home, bool share);
477  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
479  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
481  static ExecStatus post(Home home, V0 x0, V1 x1);
482  };
483 
484  /*
485  * Order propagators
486  *
487  */
488 
496  template<class V0, class V1>
497  class Lq : public MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND> {
498  protected:
502  static bool same(V0 x0, V1 x1);
504  Lq(Space& home, bool share, Lq& p);
506  Lq(Home home, V0 x0, V1 x1);
507  public:
509  virtual Actor* copy(Space& home, bool share);
511  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
513  static ExecStatus post(Home home, V0 x0, V1 x1);
514  };
515 
522  template<class V0, class V1>
523  class Le : public MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND> {
524  protected:
528  static bool same(V0 x0, V1 x1);
530  Le(Space& home, bool share, Le& p);
532  Le(Home home, V0 x0, V1 x1);
533  public:
535  virtual Actor* copy(Space& home, bool share);
537  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
539  static ExecStatus post(Home home, V0 x0, V1 x1);
540  };
541 
542 
543  /*
544  * Reified order propagators
545  *
546  */
547 
555  template<class View, class CtrlView, ReifyMode rm>
556  class ReLq : public ReBinaryPropagator<View,PC_INT_BND,CtrlView> {
557  protected:
561 
563  ReLq(Space& home, bool share, ReLq& p);
565  ReLq(Home home, View x0, View x1, CtrlView b);
566  public:
568  virtual Actor* copy(Space& home, bool share);
570  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
572  static ExecStatus post(Home home, View x0, View x1, CtrlView b);
573  };
574 
582  template<class View, class CtrlView, ReifyMode rm>
583  class ReLqInt : public ReUnaryPropagator<View,PC_INT_BND,CtrlView> {
584  protected:
587 
589  int c;
591  ReLqInt(Space& home, bool share, ReLqInt& p);
593  ReLqInt(Home home, View x, int c, CtrlView b);
594  public:
596  virtual Actor* copy(Space& home, bool share);
598  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
600  static ExecStatus post(Home home, View x, int c, CtrlView b);
601  };
602 
603 
604 
605 
606 
630  template<class VX, class VY>
631  class LexLqLe : public Propagator {
632  protected:
637  bool strict;
639  LexLqLe(Space& home, bool share, LexLqLe<VX,VY>& p);
641  LexLqLe(Home home, ViewArray<VX>& x, ViewArray<VY>& y, bool strict);
642  public:
644  virtual Actor* copy(Space& home, bool share);
646  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
648  virtual void reschedule(Space& home);
650  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
653  bool strict);
655  virtual size_t dispose(Space& home);
656  };
657 
664  template<class VX, class VY>
665  class LexNq : public Propagator {
666  protected:
668  VX x0;
670  VY y0;
672  VX x1;
674  VY y1;
681  RelTest rt, VX& x0, VY& y0, VX x1, VY y1);
685  LexNq(Space& home, bool share, LexNq<VX,VY>& p);
686  public:
688  virtual Actor* copy(Space& home, bool share);
690  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
692  virtual void reschedule(Space& home);
694  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
696  static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
698  virtual size_t dispose(Space& home);
699  };
700 
701 }}}
702 
703 #include <gecode/int/rel/eq.hpp>
704 #include <gecode/int/rel/nq.hpp>
705 #include <gecode/int/rel/lq-le.hpp>
706 #include <gecode/int/rel/lex.hpp>
707 
708 #endif
709 
710 
711 // STATISTICS: int-prop
712 
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:317
bool empty(void) const
Whether no more positions must be propagated.
Definition: lq-le.hpp:224
VX x1
View currently subscribed to.
Definition: rel.hh:672
Council of advisors
Definition: core.hpp:232
Le(Space &home, bool share, Le &p)
Constructor for cloning p.
Definition: lq-le.hpp:151
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: nq.hpp:85
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:339
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:227
int c
Integer constant to check.
Definition: rel.hh:435
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: nq.hpp:53
ReEqDomInt(Space &home, bool share, ReEqDomInt &p)
Constructor for cloning p.
Definition: eq.hpp:673
VX x0
View currently subscribed to.
Definition: rel.hh:668
ViewArray< VY > y
Definition: rel.hh:635
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:525
static ExecStatus post(Home home, ViewArray< View > &x)
Post bounds consistent propagator .
Definition: eq.hpp:406
Binary domain consistent equality propagator.
Definition: rel.hh:71
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator .
Definition: nq.hpp:122
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lex.hpp:81
Reified unary propagator.
Definition: propagator.hpp:58
Binary value propagation equality propagator.
Definition: rel.hh:107
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:507
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for .
Definition: lq-le.hpp:256
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: lq-le.hpp:73
ViewArray< VX > x
Views not yet subscribed to.
Definition: rel.hh:676
int n_subsumed
Number of already subsumed advisors (or views)
Definition: rel.hh:291
Reified binary propagator.
Definition: propagator.hpp:91
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
Definition: eq.hpp:180
LexLqLe(Space &home, bool share, LexLqLe< VX, VY > &p)
Constructor for cloning p.
Definition: lex.hpp:54
int c
Integer constant to check.
Definition: rel.hh:589
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: lex.hpp:285
void push(Space &home, int p)
Push a new position p to be propagated.
Definition: lq-le.hpp:229
VY y1
View currently subscribed to.
Definition: rel.hh:674
int p
Position of view in view array.
Definition: rel.hh:253
ViewArray< View > x
Array of views.
Definition: propagator.hpp:152
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: lex.hpp:68
Reified less or equal with integer propagator.
Definition: rel.hh:583
Base-class for propagators.
Definition: core.hpp:1092
NaryEqDom(Space &home, bool share, NaryEqDom< View > &p)
Constructor for cloning p.
Definition: eq.hpp:296
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lex.hpp:309
Lexical disequality propagator.
Definition: rel.hh:665
Base-class for advisors.
Definition: core.hpp:1294
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lex.hpp:413
n-ary domain consistent equality propagator
Definition: rel.hh:168
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post bounds consistent propagator .
Definition: eq.hpp:726
Computation spaces.
Definition: core.hpp:1748
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post bounds consistent propagator .
Definition: eq.hpp:572
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:77
ReLq(Space &home, bool share, ReLq &p)
Constructor for cloning p.
Definition: lq-le.hpp:502
Base-class for both propagators and branchers.
Definition: core.hpp:696
EqBnd(Space &home, bool share, EqBnd< View0, View1 > &p)
Constructor for cloning p.
Definition: eq.hpp:129
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Definition: eq.hpp:112
Gecode::IntSet d(v, 7)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:685
bool run
Whether the propagator is currently running.
Definition: rel.hh:289
Reified less or equal propagator.
Definition: rel.hh:556
Nary disequality propagator.
Definition: rel.hh:322
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
Definition: lq-le.hpp:177
int c
Integer constant to check.
Definition: rel.hh:408
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: nq.hpp:116
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:141
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition: lex.hpp:336
Nq(Space &home, bool share, Nq< V0, V1 > &p)
Constructor for cloning p.
Definition: nq.hpp:68
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:301
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:433
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
EqVal(Space &home, bool share, EqVal< View0, View1 > &p)
Constructor for cloning p.
Definition: eq.hpp:65
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:94
NaryNq(Home home, ViewArray< View > &x)
Constructor for posting.
Definition: nq.hpp:100
Council< Index > c
The advisor council.
Definition: rel.hh:248
RelTest
Result of testing relation.
Definition: view.hpp:1614
Pos * next(void) const
Return next position.
Definition: lq-le.hpp:195
virtual void reschedule(Space &home)
Schedule function.
Definition: lex.hpp:74
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:88
Reified binary domain consistent equality propagator.
Definition: rel.hh:350
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:210
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:762
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1103
int pop(Space &home)
Pop a position to be propagated and return it.
Definition: lq-le.hpp:237
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:422
ReEqBndInt(Space &home, bool share, ReEqBndInt &p)
Constructor for cloning p.
Definition: eq.hpp:751
Binary bounds consistent equality propagator.
Definition: rel.hh:137
Less or equal propagator.
Definition: rel.hh:497
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post propagator for .
Definition: lq-le.hpp:550
Reified binary bounds consistent equality propagator.
Definition: rel.hh:376
n-ary propagator
Definition: propagator.hpp:149
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: lq-le.hpp:365
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:756
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:599
EqDom(Space &home, bool share, EqDom< View0, View1 > &p)
Constructor for cloning p.
Definition: eq.hpp:198
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lex.hpp:371
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post domain consistent propagator .
Definition: eq.hpp:498
virtual void reschedule(Space &home)
Schedule function.
Definition: lq-le.hpp:416
Lq(Space &home, bool share, Lq &p)
Constructor for cloning p.
Definition: lq-le.hpp:83
View arrays.
Definition: array.hpp:234
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:147
static ExecStatus post(Home home, View0 x0, View1 x1)
Post value propagation propagator .
Definition: eq.hpp:52
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:439
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:584
ViewArray< VY > y
Views not yet subscribed to.
Definition: rel.hh:678
n-ary less and less or equal propagator
Definition: rel.hh:234
LexNq(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition: lex.hpp:270
ExecStatus resubscribe(Space &home, RelTest rt, VX &x0, VY &y0, VX x1, VY y1)
Update subscription.
Definition: lex.hpp:380
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post domain consistent propagator .
Definition: eq.hpp:648
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: nq.hpp:162
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:531
Reified bounds consistent equality with integer propagator.
Definition: rel.hh:429
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post propagator for .
Definition: lq-le.hpp:468
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
Post propagator for lexical order between x and y.
Definition: lex.hpp:245
virtual void reschedule(Space &home)
Schedule function.
Definition: lex.hpp:291
Generic domain change information to be supplied to advisors.
Definition: core.hpp:281
Mixed binary propagator.
Definition: propagator.hpp:213
void dispose(Space &home)
Free memory for this position.
Definition: lq-le.hpp:217
Lexical ordering propagator.
Definition: rel.hh:631
ReLqInt(Space &home, bool share, ReLqInt &p)
Constructor for cloning p.
Definition: lq-le.hpp:579
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: lq-le.hpp:139
Propagation cost.
Definition: core.hpp:554
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lq-le.hpp:371
ExecStatus
Definition: core.hpp:540
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:448
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: nq.hpp:155
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:156
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lex.hpp:62
Base-class for freelist-managed objects.
bool strict
Determines whether propagator is strict or not.
Definition: rel.hh:637
Binary disequality propagator.
Definition: rel.hh:464
Post propagator for SetVar x
Definition: set.hh:784
ViewArray< VX > x
View arrays.
Definition: rel.hh:634
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:216
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:89
NaryLqLe(Space &home, bool share, NaryLqLe< View, o > &p)
Constructor for cloning p.
Definition: lq-le.hpp:330
NaryEqBnd(Space &home, bool share, NaryEqBnd< View > &p)
Constructor for cloning p.
Definition: eq.hpp:428
Positions in view array that have to be propagated.
Definition: rel.hh:250
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: lq-le.hpp:384
n-ary bounds consistent equality propagator
Definition: rel.hh:200
static const int n_threshold
Compact during cloning when more advisors than that are subsumed.
Definition: rel.hh:293
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:307
ReEqBnd(Space &home, bool share, ReEqBnd &p)
Constructor for cloning p.
Definition: eq.hpp:594
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:590
static bool same(V0 x0, V1 x1)
Whether views refer to same variable.
Definition: lq-le.hpp:114
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function: low unary.
Definition: eq.hpp:83
int i
The position of the view in the view array.
Definition: rel.hh:241
Gecode toplevel namespace
Pos(int p, Pos *n)
Initialize with position p and next position n.
Definition: lq-le.hpp:190
static ExecStatus post(Home home, ViewArray< View > &x)
Post domain consistent propagator .
Definition: eq.hpp:274
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lex.hpp:91
Advisors for views (by position in array)
Definition: rel.hh:238
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: nq.hpp:73
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:513
Less propagator.
Definition: rel.hh:523
int ModEventDelta
Modification event deltas.
Definition: core.hpp:169
Reified domain consistent equality with integer propagator.
Definition: rel.hh:402
Home class for posting propagators
Definition: core.hpp:922
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:679
VY y0
View currently subscribed to.
Definition: rel.hh:670
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:162
Pos * pos
Stack of positions.
Definition: rel.hh:281
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:605
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: nq.hpp:105
static bool same(V0 x0, V1 x1)
Whether views refer to same variable.
Definition: lq-le.hpp:54
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: nq.hpp:79
ReEqDom(Space &home, bool share, ReEqDom &p)
Constructor for cloning p.
Definition: eq.hpp:520