Generated on Tue Jan 28 2020 00:00:00 for Gecode by doxygen 1.8.17
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: nq.hpp:85
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:433
int c
Integer constant to check.
Definition: rel.hh:408
Lexical ordering propagator.
Definition: rel.hh:631
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:762
Post propagator for SetVar x
Definition: set.hh:784
n-ary less and less or equal propagator
Definition: rel.hh:234
Less or equal propagator.
Definition: rel.hh:497
static ExecStatus post(Home home, ViewArray< View > &x)
Post bounds consistent propagator .
Definition: eq.hpp:406
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lex.hpp:62
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post domain consistent propagator .
Definition: eq.hpp:648
VX x1
View currently subscribed to.
Definition: rel.hh:672
static bool same(V0 x0, V1 x1)
Whether views refer to same variable.
Definition: lq-le.hpp:54
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post propagator for .
Definition: lq-le.hpp:468
Reified less or equal with integer propagator.
Definition: rel.hh:583
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:227
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: nq.hpp:162
Reified domain consistent equality with integer propagator.
Definition: rel.hh:402
VX x0
View currently subscribed to.
Definition: rel.hh:668
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: nq.hpp:53
ReEqBndInt(Space &home, bool share, ReEqBndInt &p)
Constructor for cloning p.
Definition: eq.hpp:751
int c
Integer constant to check.
Definition: rel.hh:589
bool empty(void) const
Whether no more positions must be propagated.
Definition: lq-le.hpp:224
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: nq.hpp:105
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:339
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:439
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for .
Definition: lq-le.hpp:256
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lex.hpp:81
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: nq.hpp:155
Pos * next(void) const
Return next position.
Definition: lq-le.hpp:195
View0 x0
View of type View0.
Definition: propagator.hpp:216
View x1
Definition: propagator.hpp:94
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lex.hpp:413
int n_subsumed
Number of already subsumed advisors (or views)
Definition: rel.hh:291
ViewArray< VX > x
Views not yet subscribed to.
Definition: rel.hh:676
void dispose(Space &home)
Free memory for this position.
Definition: lq-le.hpp:217
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lex.hpp:91
void push(Space &home, int p)
Push a new position p to be propagated.
Definition: lq-le.hpp:229
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post domain consistent propagator .
Definition: eq.hpp:498
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
Definition: eq.hpp:180
Computation spaces.
Definition: core.hpp:1748
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: lex.hpp:285
Le(Space &home, bool share, Le &p)
Constructor for cloning p.
Definition: lq-le.hpp:151
Base-class for both propagators and branchers.
Definition: core.hpp:696
VY y1
View currently subscribed to.
Definition: rel.hh:674
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:77
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: lex.hpp:68
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: lq-le.hpp:73
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:679
ViewArray< View > x
Array of views.
Definition: propagator.hpp:152
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lex.hpp:309
ViewArray< VX > x
View arrays.
Definition: rel.hh:634
Reified unary propagator.
Definition: propagator.hpp:58
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
Definition: lq-le.hpp:177
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:94
virtual void reschedule(Space &home)
Schedule function.
Definition: lex.hpp:74
n-ary domain consistent equality propagator
Definition: rel.hh:168
Binary disequality propagator.
Definition: rel.hh:464
NaryEqDom(Space &home, bool share, NaryEqDom< View > &p)
Constructor for cloning p.
Definition: eq.hpp:296
View1 x1
View of type View1.
Definition: propagator.hpp:218
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post bounds consistent propagator .
Definition: eq.hpp:572
View x0
Two views.
Definition: propagator.hpp:94
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:513
Less propagator.
Definition: rel.hh:523
Gecode toplevel namespace
EqVal(Space &home, bool share, EqVal< View0, View1 > &p)
Constructor for cloning p.
Definition: eq.hpp:65
Base-class for propagators.
Definition: core.hpp:1092
EqBnd(Space &home, bool share, EqBnd< View0, View1 > &p)
Constructor for cloning p.
Definition: eq.hpp:129
Mixed binary propagator.
Definition: propagator.hpp:213
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Definition: eq.hpp:112
NaryEqBnd(Space &home, bool share, NaryEqBnd< View > &p)
Constructor for cloning p.
Definition: eq.hpp:428
Advisors for views (by position in array)
Definition: rel.hh:238
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:422
Binary domain consistent equality propagator.
Definition: rel.hh:71
Reified binary bounds consistent equality propagator.
Definition: rel.hh:376
int c
Integer constant to check.
Definition: rel.hh:435
bool run
Whether the propagator is currently running.
Definition: rel.hh:289
Generic domain change information to be supplied to advisors.
Definition: core.hpp:281
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:141
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition: lex.hpp:336
Binary value propagation equality propagator.
Definition: rel.hh:107
Home class for posting propagators
Definition: core.hpp:922
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Nary disequality propagator.
Definition: rel.hh:322
Lq(Space &home, bool share, Lq &p)
Constructor for cloning p.
Definition: lq-le.hpp:83
Reified less or equal propagator.
Definition: rel.hh:556
n-ary propagator
Definition: propagator.hpp:149
ReEqDom(Space &home, bool share, ReEqDom &p)
Constructor for cloning p.
Definition: eq.hpp:520
Reified binary propagator.
Definition: propagator.hpp:91
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: lq-le.hpp:365
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:147
int p
Position of view in view array.
Definition: rel.hh:253
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:307
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:210
ReEqBnd(Space &home, bool share, ReEqBnd &p)
Constructor for cloning p.
Definition: eq.hpp:594
ReEqDomInt(Space &home, bool share, ReEqDomInt &p)
Constructor for cloning p.
Definition: eq.hpp:673
static ExecStatus post(Home home, View0 x0, View1 x1)
Post value propagation propagator .
Definition: eq.hpp:52
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: lq-le.hpp:584
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1103
Lexical disequality propagator.
Definition: rel.hh:665
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, ViewArray< View > &x)
Post domain consistent propagator .
Definition: eq.hpp:274
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:88
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator .
Definition: nq.hpp:122
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:448
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, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
Post propagator for lexical order between x and y.
Definition: lex.hpp:245
bool strict
Determines whether propagator is strict or not.
Definition: rel.hh:637
virtual void reschedule(Space &home)
Schedule function.
Definition: lex.hpp:291
virtual void reschedule(Space &home)
Schedule function.
Definition: lq-le.hpp:416
ViewArray< VY > y
Views not yet subscribed to.
Definition: rel.hh:678
Council< Index > c
The advisor council.
Definition: rel.hh:248
Base-class for freelist-managed objects.
LexNq(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition: lex.hpp:270
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post bounds consistent propagator .
Definition: eq.hpp:726
Propagation cost.
Definition: core.hpp:554
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lq-le.hpp:371
int pop(Space &home)
Pop a position to be propagated and return it.
Definition: lq-le.hpp:237
Council of advisors
Definition: core.hpp:232
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition: lq-le.hpp:139
Pos * pos
Stack of positions.
Definition: rel.hh:281
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: lq-le.hpp:384
Gecode::IntSet d(v, 7)
Base-class for advisors.
Definition: core.hpp:1294
ViewArray< VY > y
Definition: rel.hh:635
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: eq.hpp:216
Positions in view array that have to be propagated.
Definition: rel.hh:250
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post propagator for .
Definition: lq-le.hpp:550
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:89
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:525
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: nq.hpp:73
CtrlView b
Boolean control view.
Definition: propagator.hpp:63
Reified binary domain consistent equality propagator.
Definition: rel.hh:350
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:507
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:590
Reified bounds consistent equality with integer propagator.
Definition: rel.hh:429
int i
The position of the view in the view array.
Definition: rel.hh:241
static const int n_threshold
Compact during cloning when more advisors than that are subsumed.
Definition: rel.hh:293
Binary bounds consistent equality propagator.
Definition: rel.hh:137
RelTest
Result of testing relation.
Definition: view.hpp:1614
Pos(int p, Pos *n)
Initialize with position p and next position n.
Definition: lq-le.hpp:190
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: nq.hpp:79
ReLqInt(Space &home, bool share, ReLqInt &p)
Constructor for cloning p.
Definition: lq-le.hpp:579
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:599
n-ary bounds consistent equality propagator
Definition: rel.hh:200
View arrays.
Definition: array.hpp:234
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:317
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:685
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function: low unary.
Definition: eq.hpp:83
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq-le.hpp:162
int ModEventDelta
Modification event deltas.
Definition: core.hpp:169
static bool same(V0 x0, V1 x1)
Whether views refer to same variable.
Definition: lq-le.hpp:114
NaryNq(Home home, ViewArray< View > &x)
Constructor for posting.
Definition: nq.hpp:100
NaryLqLe(Space &home, bool share, NaryLqLe< View, o > &p)
Constructor for cloning p.
Definition: lq-le.hpp:330
CtrlView b
Boolean control view.
Definition: propagator.hpp:96
Nq(Space &home, bool share, Nq< V0, V1 > &p)
Constructor for cloning p.
Definition: nq.hpp:68
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:531
LexLqLe(Space &home, bool share, LexLqLe< VX, VY > &p)
Constructor for cloning p.
Definition: lex.hpp:54
ReLq(Space &home, bool share, ReLq &p)
Constructor for cloning p.
Definition: lq-le.hpp:502
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq-le.hpp:156
VY y0
View currently subscribed to.
Definition: rel.hh:670
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:605
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:756
ExecStatus
Definition: core.hpp:540