Generated on Wed Jan 1 2020 10:37:59 for Gecode by doxygen 1.8.16
linear.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  * Tias Guns <tias.guns@cs.kuleuven.be>
7  *
8  * Copyright:
9  * Christian Schulte, 2002
10  * Guido Tack, 2004
11  * Tias Guns, 2009
12  *
13  * This file is part of Gecode, the generic constraint
14  * development environment:
15  * http://www.gecode.org
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining
18  * a copy of this software and associated documentation files (the
19  * "Software"), to deal in the Software without restriction, including
20  * without limitation the rights to use, copy, modify, merge, publish,
21  * distribute, sublicense, and/or sell copies of the Software, and to
22  * permit persons to whom the Software is furnished to do so, subject to
23  * the following conditions:
24  *
25  * The above copyright notice and this permission notice shall be
26  * included in all copies or substantial portions of the Software.
27  *
28  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35  *
36  */
37 
38 #ifndef __GECODE_INT_LINEAR_HH__
39 #define __GECODE_INT_LINEAR_HH__
40 
41 #include <gecode/int.hh>
42 
48 namespace Gecode { namespace Int { namespace Linear {
49 
50  /*
51  * Binary propagators
52  *
53  */
54 
64  template<class Val, class A, class B, PropCond pc>
65  class LinBin : public Propagator {
66  protected:
68  A x0;
70  B x1;
72  Val c;
74  LinBin(Space& home, LinBin& p);
76  LinBin(Space& home, Propagator& p, A x0, B x1, Val c);
78  LinBin(Home home, A x0, B x1, Val c);
79  public:
81  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
83  virtual void reschedule(Space& home);
85  virtual size_t dispose(Space& home);
86  };
87 
97  template<class Val, class A, class B, PropCond pc, class Ctrl>
98  class ReLinBin : public Propagator {
99  protected:
101  A x0;
103  B x1;
105  Val c;
107  Ctrl b;
109  ReLinBin(Space& home, ReLinBin& p);
111  ReLinBin(Home home, A x0, B x1, Val c, Ctrl b);
112  public:
114  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
116  virtual void reschedule(Space& home);
118  virtual size_t dispose(Space& home);
119  };
120 
133  template<class Val, class A, class B>
134  class EqBin : public LinBin<Val,A,B,PC_INT_BND> {
135  protected:
139 
141  EqBin(Space& home, EqBin& p);
143  EqBin(Home home, A x0, B x1, Val c);
144  public:
146  EqBin(Space& home, Propagator& p, A x0, B x1, Val c);
148  virtual Actor* copy(Space& home);
150  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
152  static ExecStatus post(Home home, A x0, B x1, Val c);
153  };
154 
167  template<class Val, class A, class B, class Ctrl, ReifyMode rm>
168  class ReEqBin : public ReLinBin<Val,A,B,PC_INT_BND,Ctrl> {
169  protected:
174 
176  ReEqBin(Space& home, ReEqBin& p);
178  ReEqBin(Home home,A,B,Val,Ctrl);
179  public:
181  virtual Actor* copy(Space& home);
183  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
185  static ExecStatus post(Home home, A x0, B x1, Val c, Ctrl b);
186  };
187 
200  template<class Val, class A, class B>
201  class NqBin : public LinBin<Val,A,B,PC_INT_VAL> {
202  protected:
206 
208  NqBin(Space& home, NqBin& p);
210  NqBin(Home home, A x0, B x1, Val c);
211  public:
213  NqBin(Space& home, Propagator& p, A x0, B x1, Val c);
215  virtual Actor* copy(Space& home);
217  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
219  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
221  static ExecStatus post(Home home, A x0, B x1, Val c);
222  };
223 
236  template<class Val, class A, class B>
237  class LqBin : public LinBin<Val,A,B,PC_INT_BND> {
238  protected:
242 
244  LqBin(Space& home, LqBin& p);
246  LqBin(Home home, A x0, B x1, Val c);
247  public:
249  LqBin(Space& home, Propagator& p, A x0, B x1, Val c);
251  virtual Actor* copy(Space& home);
253  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
255  static ExecStatus post(Home home, A x0, B x1, Val c);
256  };
257 
270  template<class Val, class A, class B>
271  class GqBin : public LinBin<Val,A,B,PC_INT_BND> {
272  protected:
276 
278  GqBin(Space& home, GqBin& p);
280  GqBin(Home home, A x0, B x1, Val c);
281  public:
283  GqBin(Space& home, Propagator& p, A x0, B x1, Val c);
285  virtual Actor* copy(Space& home);
287  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
289  static ExecStatus post(Home home, A x0, B x1, Val c);
290  };
291 
304  template<class Val, class A, class B, ReifyMode rm>
305  class ReLqBin : public ReLinBin<Val,A,B,PC_INT_BND,BoolView> {
306  protected:
311 
313  ReLqBin(Space& home, ReLqBin& p);
315  ReLqBin(Home home, A x0, B x1, Val c, BoolView b);
316  public:
318  virtual Actor* copy(Space& home);
320  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
322  static ExecStatus post(Home home, A x0, B x1, Val c, BoolView b);
323  };
324 
325 }}}
326 
328 
329 namespace Gecode { namespace Int { namespace Linear {
330 
331  /*
332  * Ternary propagators
333  *
334  */
335 
345  template<class Val, class A, class B, class C, PropCond pc>
346  class LinTer : public Propagator {
347  protected:
349  A x0;
351  B x1;
353  C x2;
355  Val c;
357  LinTer(Space& home, LinTer& p);
359  LinTer(Home home, A x0, B x1, C x2, Val c);
361  LinTer(Space& home, Propagator& p, A x0, B x1, C x2, Val c);
362  public:
364  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
366  virtual void reschedule(Space& home);
368  virtual size_t dispose(Space& home);
369  };
370 
383  template<class Val, class A, class B, class C>
384  class EqTer : public LinTer<Val,A,B,C,PC_INT_BND> {
385  protected:
390 
392  EqTer(Space& home, EqTer& p);
394  EqTer(Home home, A x0, B x1, C x2, Val c);
395  public:
397  EqTer(Space& home, Propagator& p, A x0, B x1, C x2, Val c);
399  virtual Actor* copy(Space& home);
401  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
403  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
404  };
405 
418  template<class Val, class A, class B, class C>
419  class NqTer : public LinTer<Val,A,B,C,PC_INT_VAL> {
420  protected:
425 
427  NqTer(Space& home, NqTer& p);
429  NqTer(Home home, A x0, B x1, C x2, Val c);
430  public:
432  NqTer(Space& home, Propagator& p, A x0, B x1, C x2, Val c);
434  virtual Actor* copy(Space& home);
436  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
438  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
439  };
440 
453  template<class Val, class A, class B, class C>
454  class LqTer : public LinTer<Val,A,B,C,PC_INT_BND> {
455  protected:
460 
462  LqTer(Space& home, LqTer& p);
464  LqTer(Home home, A x0, B x1, C x2, Val c);
465  public:
467  LqTer(Space& home, Propagator& p, A x0, B x1, C x2, Val c);
469  virtual Actor* copy(Space& home);
471  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
473  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
474  };
475 
476 }}}
477 
479 
480 namespace Gecode { namespace Int { namespace Linear {
481 
482  /*
483  * n-ary propagators
484  *
485  */
486 
496  template<class Val, class P, class N, PropCond pc>
497  class Lin : public Propagator {
498  protected:
504  Val c;
505 
507  Lin(Space& home, Lin<Val,P,N,pc>& p);
509  Lin(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
510  public:
512  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
514  virtual void reschedule(Space& home);
516  virtual size_t dispose(Space& home);
517  };
518 
528  template<class Val, class P, class N, PropCond pc, class Ctrl>
529  class ReLin : public Lin<Val,P,N,pc> {
530  protected:
531  using Lin<Val,P,N,pc>::x;
532  using Lin<Val,P,N,pc>::y;
534  Ctrl b;
536  ReLin(Space& home, ReLin& p);
538  ReLin(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
539  public:
541  virtual void reschedule(Space& home);
543  virtual size_t dispose(Space& home);
544  };
545 
551  template<class Val, class View>
553  Val& c, Val& sl, Val& su);
554 
560  template<class Val, class View>
562  Val& c, Val& sl, Val& su);
563 
576  template<class Val, class P, class N>
577  class Eq : public Lin<Val,P,N,PC_INT_BND> {
578  protected:
582 
584  Eq(Space& home, Eq& p);
585  public:
587  Eq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
589  virtual Actor* copy(Space& home);
591  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
593  static ExecStatus
594  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
595  };
596 
607  template<class Val, class View>
608  class DomEq
609  : public Lin<Val,View,View,PC_INT_DOM> {
610  protected:
614 
616  DomEq(Space& home, DomEq& p);
617  public:
619  DomEq(Home home, ViewArray<View>& x, ViewArray<View>& y, Val c);
621  virtual Actor* copy(Space& home);
628  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
630  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
632  static ExecStatus
633  post(Home home, ViewArray<View>& x, ViewArray<View>& y, Val c);
634  };
635 
648  template<class Val, class P, class N, class Ctrl, ReifyMode rm>
649  class ReEq : public ReLin<Val,P,N,PC_INT_BND,Ctrl> {
650  protected:
655 
657  ReEq(Space& home, ReEq& p);
658  public:
660  ReEq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
662  virtual Actor* copy(Space& home);
664  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
666  static ExecStatus
667  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
668  };
669 
682  template<class Val, class P, class N>
683  class Nq : public Lin<Val,P,N,PC_INT_VAL> {
684  protected:
688 
690  Nq(Space& home, Nq& p);
691  public:
693  Nq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
695  virtual Actor* copy(Space& home);
697  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
699  static ExecStatus
700  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
701  };
702 
715  template<class Val, class P, class N>
716  class Lq : public Lin<Val,P,N,PC_INT_BND> {
717  protected:
721 
723  Lq(Space& home, Lq& p);
724  public:
726  Lq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
728  virtual Actor* copy(Space& home);
730  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
732  static ExecStatus
733  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
734  };
735 
748  template<class Val, class P, class N, ReifyMode rm>
749  class ReLq : public ReLin<Val,P,N,PC_INT_BND,BoolView> {
750  protected:
755 
757  ReLq(Space& home, ReLq& p);
758  public:
760  ReLq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, BoolView b);
762  virtual Actor* copy(Space& home);
764  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
766  static ExecStatus
767  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, BoolView b);
768  };
769 
770 }}}
771 
774 
775 namespace Gecode { namespace Int { namespace Linear {
776 
777  /*
778  * Boolean linear propagators
779  *
780  */
781 
786  template<class VX>
787  class LinBoolInt : public Propagator {
788  protected:
794  int n_as;
796  int n_hs;
798  int c;
800  void normalize(void);
802  LinBoolInt(Space& home, LinBoolInt& p);
804  LinBoolInt(Home home, ViewArray<VX>& x, int n_s, int c);
805  public:
807  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
809  virtual size_t dispose(Space& home);
810  };
811 
818  template<class VX>
819  class EqBoolInt : public LinBoolInt<VX> {
820  protected:
821  using LinBoolInt<VX>::co;
822  using LinBoolInt<VX>::x;
823  using LinBoolInt<VX>::n_as;
824  using LinBoolInt<VX>::n_hs;
825  using LinBoolInt<VX>::c;
828  EqBoolInt(Space& home, EqBoolInt& p);
830  EqBoolInt(Home home, ViewArray<VX>& x, int c);
831  public:
833  virtual Actor* copy(Space& home);
835  virtual void reschedule(Space& home);
837  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
839  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
841  static ExecStatus post(Home home, ViewArray<VX>& x, int c);
842  };
843 
850  template<class VX>
851  class GqBoolInt : public LinBoolInt<VX> {
852  protected:
853  using LinBoolInt<VX>::co;
854  using LinBoolInt<VX>::x;
855  using LinBoolInt<VX>::n_as;
856  using LinBoolInt<VX>::n_hs;
857  using LinBoolInt<VX>::c;
860  GqBoolInt(Space& home, GqBoolInt& p);
862  GqBoolInt(Home home, ViewArray<VX>& x, int c);
863  public:
865  virtual Actor* copy(Space& home);
867  virtual void reschedule(Space& home);
869  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
871  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
873  static ExecStatus post(Home home, ViewArray<VX>& x, int c);
874  };
875 
882  template<class VX>
883  class NqBoolInt : public BinaryPropagator<VX,PC_INT_VAL> {
884  protected:
890  int c;
892  bool resubscribe(Space& home, VX& y);
894  NqBoolInt(Home home, ViewArray<VX>& b, int c);
896  NqBoolInt(Space& home, NqBoolInt<VX>& p);
897  public:
899  virtual Actor* copy(Space& home);
901  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
903  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
905  static ExecStatus post(Home home, ViewArray<VX>& b, int c);
907  virtual size_t dispose(Space& home);
908  };
909 
910 
915  template<class VX, class VB>
916  class ReLinBoolInt : public Propagator {
917  protected:
923  int n_s;
925  int c;
927  VB b;
929  void normalize(void);
931  ReLinBoolInt(Space& home, ReLinBoolInt& p);
933  ReLinBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
934  public:
936  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
938  virtual size_t dispose(Space& home);
939  };
940 
941 
945  template<class BV>
946  class BoolNegTraits {};
947 
954  template<class VX, class VB, ReifyMode rm>
955  class ReGqBoolInt : public ReLinBoolInt<VX,VB> {
956  protected:
964  ReGqBoolInt(Space& home, ReGqBoolInt& p);
966  ReGqBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
967  public:
969  virtual Actor* copy(Space& home);
971  virtual void reschedule(Space& home);
973  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
975  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
977  static ExecStatus post(Home home, ViewArray<VX>& x, int c, VB b);
978  };
979 
986  template<class VX, class VB, ReifyMode rm>
987  class ReEqBoolInt : public ReLinBoolInt<VX,VB> {
988  protected:
996  ReEqBoolInt(Space& home, ReEqBoolInt& p);
998  ReEqBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
999  public:
1001  virtual Actor* copy(Space& home);
1003  virtual void reschedule(Space& home);
1005  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
1007  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1009  static ExecStatus post(Home home, ViewArray<VX>& x, int c, VB b);
1010  };
1011 
1012 }}}
1013 
1015 
1016 namespace Gecode { namespace Int { namespace Linear {
1017 
1022  template<class XV, class YV>
1023  class LinBoolView : public Propagator {
1024  protected:
1028  YV y;
1030  int c;
1032  LinBoolView(Space& home, LinBoolView& p);
1034  LinBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1035  public:
1037  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
1039  virtual void reschedule(Space& home);
1041  virtual size_t dispose(Space& home);
1042  };
1043 
1044 
1051  template<class XV, class YV>
1052  class EqBoolView : public LinBoolView<XV,YV> {
1053  protected:
1054  using LinBoolView<XV,YV>::x;
1055  using LinBoolView<XV,YV>::y;
1056  using LinBoolView<XV,YV>::c;
1057 
1059  EqBoolView(Space& home, EqBoolView& p);
1061  EqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1062  public:
1064  virtual Actor* copy(Space& home);
1066  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1068  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1069  };
1070 
1077  template<class XV, class YV>
1078  class NqBoolView : public LinBoolView<XV,YV> {
1079  protected:
1080  using LinBoolView<XV,YV>::x;
1081  using LinBoolView<XV,YV>::y;
1082  using LinBoolView<XV,YV>::c;
1083 
1085  NqBoolView(Space& home, NqBoolView& p);
1087  NqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1088  public:
1090  virtual Actor* copy(Space& home);
1092  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1094  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1095  };
1096 
1103  template<class XV, class YV>
1104  class GqBoolView : public LinBoolView<XV,YV> {
1105  protected:
1106  using LinBoolView<XV,YV>::x;
1107  using LinBoolView<XV,YV>::y;
1108  using LinBoolView<XV,YV>::c;
1109 
1111  GqBoolView(Space& home, GqBoolView& p);
1113  GqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1114  public:
1116  virtual Actor* copy(Space& home);
1118  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1120  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1121  };
1122 
1123 }}}
1124 
1126 
1127 namespace Gecode { namespace Int { namespace Linear {
1128 
1130  class ScaleBool {
1131  public:
1133  int a;
1136  };
1137 
1140  private:
1142  ScaleBool* _fst;
1144  ScaleBool* _lst;
1145  public:
1147  ScaleBoolArray(void);
1149  ScaleBoolArray(Space& home, int n);
1151  void subscribe(Space& home, Propagator& p);
1153  void cancel(Space& home, Propagator& p);
1155  void reschedule(Space& home, Propagator& p);
1157  void update(Space& home, ScaleBoolArray& sba);
1159  ScaleBool* fst(void) const;
1161  ScaleBool* lst(void) const;
1163  void fst(ScaleBool* f);
1165  void lst(ScaleBool* l);
1167  bool empty(void) const;
1169  int size(void) const;
1170  private:
1172  class ScaleDec {
1173  public:
1174  bool
1175  operator ()(const ScaleBool& x, const ScaleBool& y);
1176  };
1177  public:
1179  void sort(void);
1180  };
1181 
1182 
1185  public:
1187  EmptyScaleBoolArray(void);
1189  EmptyScaleBoolArray(Space& home, int n);
1191  void subscribe(Space& home, Propagator& p);
1193  void cancel(Space& home, Propagator& p);
1195  void reschedule(Space& home, Propagator& p);
1197  void update(Space& home, EmptyScaleBoolArray& esba);
1199  ScaleBool* fst(void) const;
1201  ScaleBool* lst(void) const;
1203  void fst(ScaleBool* f);
1205  void lst(ScaleBool* l);
1207  bool empty(void) const;
1209  int size(void) const;
1211  void sort(void);
1212  };
1213 
1214 
1219  template<class SBAP, class SBAN, class VX, PropCond pcx>
1220  class LinBoolScale : public Propagator {
1221  protected:
1223  SBAP p;
1225  SBAN n;
1227  VX x;
1229  int c;
1230  public:
1232  LinBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1234  LinBoolScale(Space& home, Propagator& pr,
1235  SBAP& p, SBAN& n, VX x, int c);
1237  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
1239  virtual void reschedule(Space& home);
1241  virtual size_t dispose(Space& home);
1242  };
1243 
1250  template<class SBAP, class SBAN, class VX>
1251  class EqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_BND> {
1252  protected:
1257  public:
1259  EqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1261  EqBoolScale(Space& home, Propagator& pr,
1262  SBAP& p, SBAN& n, VX x, int c);
1264  virtual Actor* copy(Space& home);
1266  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1268  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1269  };
1270 
1277  template<class SBAP, class SBAN, class VX>
1278  class LqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_BND> {
1279  protected:
1284  public:
1286  LqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1288  LqBoolScale(Space& home, Propagator& pr,
1289  SBAP& p, SBAN& n, VX x, int c);
1291  virtual Actor* copy(Space& home);
1293  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1295  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1296  };
1297 
1304  template<class SBAP, class SBAN, class VX>
1305  class NqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_VAL> {
1306  protected:
1311  public:
1313  NqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1315  NqBoolScale(Space& home, Propagator& pr,
1316  SBAP& p, SBAN& n, VX x, int c);
1318  virtual Actor* copy(Space& home);
1320  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1322  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1323  };
1324 
1325 }}}
1326 
1328 
1329 namespace Gecode { namespace Int { namespace Linear {
1330 
1335  template<class View>
1336  class Term {
1337  public:
1339  int a;
1341  View x;
1343  int p;
1344  };
1345 
1360  template<class View>
1361  void estimate(Term<View>* t, int n, int c,
1362  int& l, int& u);
1363 
1391  GECODE_INT_EXPORT void
1392  post(Home home, Term<IntView>* t, int n, IntRelType irt, int c,
1394 
1424  GECODE_INT_EXPORT void
1425  post(Home home, Term<IntView>* t, int n, IntRelType irt, int c, Reify r,
1427 
1455  GECODE_INT_EXPORT void
1456  post(Home home, Term<BoolView>* t, int n, IntRelType irt, int c,
1458 
1487  GECODE_INT_EXPORT void
1488  post(Home home, Term<BoolView>* t, int n, IntRelType irt, int c, Reify r,
1490 
1519  GECODE_INT_EXPORT void
1520  post(Home home, Term<BoolView>* t, int n, IntRelType irt, IntView y, int c=0,
1522 
1551  GECODE_INT_EXPORT void
1552  post(Home home, Term<BoolView>* t, int n, IntRelType irt, IntView y,
1554 
1555 }}}
1556 
1557 #include <gecode/int/linear/post.hpp>
1558 
1559 #endif
1560 
1561 // STATISTICS: int-prop
static ExecStatus post(Home home, A x0, B x1, Val c, Ctrl b)
Post propagator for .
Definition: int-bin.hpp:217
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:482
Propagator for bounds consistent binary linear less or equal
Definition: linear.hh:237
Post propagator for SetVar x
Definition: set.hh:767
int a
Integer coefficient.
Definition: linear.hh:1133
IntRelType
Relation types for integers.
Definition: int.hh:925
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-dom.hpp:391
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:398
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:91
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-view.hpp:51
Propagator for reified integer equal to Boolean sum (cardinality)
Definition: linear.hh:987
Baseclass for integer Boolean sum.
Definition: linear.hh:787
Post propagator for SetVar SetOpType SetVar y
Definition: set.hh:767
Propagator for integer disequal to Boolean sum (cardinality)
Definition: linear.hh:883
Propagator for reified integer less or equal to Boolean sum (cardinality)
Definition: linear.hh:955
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:280
ScaleBool * fst(void) const
Return pointer to first element.
Definition: bool-scale.hpp:134
Class for describing linear term .
Definition: linear.hh:1336
int c
Righthandside.
Definition: linear.hh:890
View x
View.
Definition: linear.hh:1341
NqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:578
EqBin(Space &home, EqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:155
ReEqBin(Space &home, ReEqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:225
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-int.hpp:584
LqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:424
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-scale.hpp:167
virtual void reschedule(Space &home)
Schedule function.
Definition: int-nary.hpp:83
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:177
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-view.hpp:68
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: bool-int.hpp:421
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:553
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:188
ScaleBool * lst(void) const
Return pointer after last element.
Definition: bool-scale.hpp:85
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:239
bool empty(void) const
Test whether array is empty.
Definition: bool-scale.hpp:142
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-nary.hpp:849
void cancel(Space &home, Propagator &p)
Cancel propagator p.
Definition: bool-scale.hpp:128
Propagator for bounds consistent n-ary linear less or equal
Definition: linear.hh:716
void bounds_n(ModEventDelta med, ViewArray< View > &y, Val &c, Val &sl, Val &su)
Definition: int-nary.hpp:161
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-dom.hpp:376
LqBin(Space &home, LqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:340
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-nary.hpp:90
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-int.hpp:602
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-view.hpp:129
Base-class for ternary linear propagators.
Definition: linear.hh:346
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-ter.hpp:123
Propagator for inequality to Boolean sum with coefficients
Definition: linear.hh:1278
int c
Righthandside.
Definition: linear.hh:798
Base-class for n-ary linear propagators.
Definition: linear.hh:497
void cancel(Space &home, Propagator &p)
Cancel propagator p.
Definition: bool-scale.hpp:57
C x2
View of type C.
Definition: linear.hh:353
NqTer(Space &home, NqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:191
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:265
NodeType t
Type of node.
Definition: bool-expr.cpp:230
int c
Integer constant on right-hand side.
Definition: linear.hh:1229
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-ter.hpp:84
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-nary.hpp:583
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:621
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-nary.hpp:432
IntPropLevel
Propagation levels for integer propagators.
Definition: int.hh:974
Computation spaces.
Definition: core.hpp:1742
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:437
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:100
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:276
Base-class for both propagators and branchers.
Definition: core.hpp:628
Base-class for binary linear propagators.
Definition: linear.hh:65
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:147
virtual void reschedule(Space &home)
Schedule function.
Definition: int-bin.hpp:73
void sort(void)
Sort array in decreasing order of coefficients.
Definition: bool-scale.hpp:111
ReLinBoolInt(Space &home, ReLinBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:518
SBAN n
Negative Boolean views with coefficients on left-hand side.
Definition: linear.hh:1225
void sort(void)
Sort array in decreasing order of coefficients.
Definition: bool-scale.hpp:146
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-nary.hpp:127
ViewArray< N > y
Array of negative views.
Definition: linear.hh:502
Propagator for integer less or equal to Boolean sum (cardinality)
Definition: linear.hh:851
Propagator for integer equal to Boolean sum (cardinality)
Definition: linear.hh:819
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-int.hpp:712
GqBin(Space &home, GqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:386
LqTer(Space &home, LqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:247
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:699
static ExecStatus post(Home home, ViewArray< View > &x, ViewArray< View > &y, Val c)
Post propagator for .
Definition: int-dom.hpp:362
ViewArray< VX > x
Boolean views.
Definition: linear.hh:792
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-bin.hpp:127
static ExecStatus post(Home home, ViewArray< VX > &x, int c, VB b)
Post propagator for .
Definition: bool-int.hpp:744
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:438
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-scale.hpp:182
static ExecStatus post(Home home, ViewArray< VX > &b, int c)
Post propagator for .
Definition: bool-int.hpp:394
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:596
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-int.hpp:693
Propagator for bounds consistent ternary linear disquality
Definition: linear.hh:419
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:309
LinTer(Space &home, LinTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:51
EmptyScaleBoolArray(void)
Default constructor.
Definition: bool-scale.hpp:122
Boolean view for Boolean variables.
Definition: view.hpp:1380
union Gecode::@602::NNF::@65 u
Union depending on nodetype t.
Gecode toplevel namespace
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:528
Propagator for bounds consistent n-ary linear equality
Definition: linear.hh:577
Base-class for propagators.
Definition: core.hpp:1064
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:458
Base-class for reified binary linear propagators.
Definition: linear.hh:98
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high unary)
Definition: bool-int.hpp:539
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:298
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:394
Ctrl b
Control view for reification.
Definition: linear.hh:534
static ExecStatus post(Home home, ViewArray< VX > &x, int c)
Post propagator for .
Definition: bool-int.hpp:321
Traits for Boolean negation view.
Definition: linear.hh:946
LinBoolInt(Space &home, LinBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:84
Generic domain change information to be supplied to advisors.
Definition: core.hpp:204
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-ter.hpp:252
Propagator for equality to Boolean sum (cardinality)
Definition: linear.hh:1052
Reification specification.
Definition: int.hh:876
#define GECODE_INT_EXPORT
Definition: int.hh:81
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:467
B x1
View of type B.
Definition: linear.hh:70
Propagator for bounds consistent n-ary linear disequality
Definition: linear.hh:683
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:391
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-int.hpp:248
Home class for posting propagators
Definition: core.hpp:856
Propagator for equality to Boolean sum with coefficients
Definition: linear.hh:1251
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:332
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:378
Propagator for greater or equal to Boolean sum (cardinality)
Definition: linear.hh:1104
DomEq(Space &home, DomEq &p)
Constructor for cloning p.
Definition: int-dom.hpp:371
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: int-bin.hpp:113
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-scale.hpp:593
int c
Righthandside (constant part from Boolean views assigned to 1)
Definition: linear.hh:1030
ViewArray< VX > x
Views.
Definition: linear.hh:921
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:720
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-int.hpp:427
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: int-nary.hpp:77
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:767
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-nary.hpp:381
A x0
View of type A.
Definition: linear.hh:349
void subscribe(Space &home, Propagator &p)
Subscribe propagator p.
Definition: bool-scale.hpp:52
void reschedule(Space &home, Propagator &p)
Schedule propagator p.
Definition: bool-scale.hpp:130
B x1
View of type B.
Definition: linear.hh:103
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:104
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-scale.hpp:224
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1075
YV y
View to compare number of assigned Boolean views to.
Definition: linear.hh:1028
Array of scale Boolean views.
Definition: linear.hh:1139
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:131
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:403
Propagator for reified bounds consistent n-ary linear less or equal
Definition: linear.hh:749
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:686
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-nary.hpp:732
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c, Ctrl b)
Post propagator for .
Definition: int-nary.hpp:411
ViewArray< P > x
Array of positive views.
Definition: linear.hh:500
Baseclass for reified integer Boolean sum.
Definition: linear.hh:916
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:180
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-view.hpp:74
Base class for linear Boolean constraints with coefficients.
Definition: linear.hh:1220
Lq(Space &home, Lq &p)
Constructor for cloning p.
Definition: int-nary.hpp:646
Propagator for bounds consistent binary linear disequality
Definition: linear.hh:201
ScaleBoolArray(void)
Default constructor.
Definition: bool-scale.hpp:41
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:855
ReLq(Space &home, ReLq &p)
Constructor for cloning p.
Definition: int-nary.hpp:844
Base-class for Boolean linear propagators.
Definition: linear.hh:1023
LinBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:156
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:252
NqBoolInt(Home home, ViewArray< VX > &b, int c)
Constructor for posting.
Definition: bool-int.hpp:358
virtual void reschedule(Space &home)
Schedule function.
Definition: int-bin.hpp:119
Propagator for reified bounds consistent binary linear equality
Definition: linear.hh:168
Propagator for domain consistent n-ary linear equality
Definition: linear.hh:608
VX x
Integer view on right-hand side.
Definition: linear.hh:1227
int n_s
Number of subscriptions.
Definition: linear.hh:923
static ExecStatus post(Home home, ViewArray< VX > &x, int c)
Post propagator for .
Definition: bool-int.hpp:198
NqBin(Space &home, NqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:284
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:221
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c, BoolView b)
Post propagator for .
Definition: int-nary.hpp:828
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:231
static ExecStatus post(Home home, A x0, B x1, Val c, BoolView b)
Post propagator for .
Definition: int-bin.hpp:424
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:166
Propagator for bounds consistent ternary linear equality
Definition: linear.hh:384
LinBin(Space &home, LinBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:50
virtual void reschedule(Space &home)
Schedule function.
Definition: int-nary.hpp:119
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: int-bin.hpp:303
void normalize(void)
Normalize by removing unused views.
Definition: bool-int.hpp:505
EqBoolView(Space &home, EqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:124
int size(void) const
Return number of elements.
Definition: bool-scale.hpp:101
void bounds_p(ModEventDelta med, ViewArray< View > &x, Val &c, Val &sl, Val &su)
Definition: int-nary.hpp:140
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-ter.hpp:196
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:254
GqBoolView(Space &home, GqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:287
Propagator for bounds consistent binary linear greater or equal
Definition: linear.hh:271
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:745
void normalize(void)
Normalize by removing unused views.
Definition: bool-int.hpp:58
int n_as
Number of active subscriptions.
Definition: linear.hh:794
Val c
Value of type Val.
Definition: linear.hh:355
Propagation cost.
Definition: core.hpp:486
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:260
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:135
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-bin.hpp:80
Val c
Constant value.
Definition: linear.hh:504
GqBoolInt(Space &home, GqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:120
NNF * l
Left subtree.
Definition: bool-expr.cpp:240
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:590
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-view.hpp:292
Council of advisors
Definition: core.hpp:155
Val c
Value of type Val.
Definition: linear.hh:105
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: int-bin.hpp:67
EqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:209
Eq(Space &home, Eq &p)
Constructor for cloning p.
Definition: int-nary.hpp:295
Simple propagation levels.
Definition: int.hh:976
ReLin(Space &home, ReLin &p)
Constructor for cloning p.
Definition: int-nary.hpp:112
B x1
View of type B.
Definition: linear.hh:351
Propagator for disequality to Boolean sum with coefficients
Definition: linear.hh:1305
ScaleBool * lst(void) const
Return pointer after last element.
Definition: bool-scale.hpp:136
EqBoolInt(Space &home, EqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:243
int size(void) const
Return number of elements.
Definition: bool-scale.hpp:144
Gecode::IntSet d(v, 7)
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:345
int n_hs
Number of views that have or had subscriptions.
Definition: linear.hh:796
Base-class for advisors.
Definition: core.hpp:1292
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:631
Lin(Space &home, Lin< Val, P, N, pc > &p)
Constructor for cloning p.
Definition: int-nary.hpp:69
bool empty(void) const
Test whether array is empty.
Definition: bool-scale.hpp:97
Base-class for reified n-ary linear propagators.
Definition: linear.hh:529
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-scale.hpp:439
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:610
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:368
Integer view for integer variables.
Definition: view.hpp:129
ReEqBoolInt(Space &home, ReEqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:688
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:443
Val c
Value of type Val.
Definition: linear.hh:72
Propagator for reified bounds consistent n-ary linear equality
Definition: linear.hh:649
ViewArray< XV > x
Boolean views.
Definition: linear.hh:1026
bool resubscribe(Space &home, VX &y)
Update subscription.
Definition: bool-int.hpp:433
A x0
View of type A.
Definition: linear.hh:101
Ctrl b
Control view for reification.
Definition: linear.hh:107
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:183
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-view.hpp:215
void estimate(Term< View > *t, int n, int c, int &l, int &u)
Estimate lower and upper bounds.
Definition: post.hpp:41
Propagator for bounds consistent ternary linear less or equal
Definition: linear.hh:454
int a
Coefficient.
Definition: linear.hh:1339
Propagator for reified bounds consistent binary linear less or equal
Definition: linear.hh:305
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:297
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: int-bin.hpp:289
Empty array of scale Boolean views.
Definition: linear.hh:1184
NqBoolView(Space &home, NqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:210
void update(Space &home, EmptyScaleBoolArray &esba)
Update sba during copying.
Definition: bool-scale.hpp:132
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:357
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high unary)
Definition: bool-int.hpp:94
void reschedule(Space &home, Propagator &p)
Schedule propagator p.
Definition: bool-scale.hpp:62
Propagator for bounds consistent binary linear equality
Definition: linear.hh:134
LinBoolView(Space &home, LinBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:60
Council< Advisor > co
Council for single advisor.
Definition: linear.hh:919
void post(Home home, Term< BoolView > *t, int n, IntRelType irt, IntView x, int c, IntPropLevel)
Post propagator for linear constraint over Booleans.
Definition: bool-post.cpp:589
Nq(Space &home, Nq &p)
Constructor for cloning p.
Definition: int-nary.hpp:497
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
VB b
Control variable.
Definition: linear.hh:927
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-scale.hpp:174
Gecode::FloatVal c(-8, 8)
virtual void reschedule(Space &home)
Schedule function.
Definition: int-ter.hpp:76
void subscribe(Space &home, Propagator &p)
Subscribe propagator p.
Definition: bool-scale.hpp:126
ReLqBin(Space &home, ReLqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:432
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:234
ScaleBool * fst(void) const
Return pointer to first element.
Definition: bool-scale.hpp:81
Coefficient and Boolean view.
Definition: linear.hh:1130
ReEq(Space &home, ReEq &p)
Constructor for cloning p.
Definition: int-nary.hpp:427
int p
Original position in array (for sorting into canonical order)
Definition: linear.hh:1343
Binary propagator.
Definition: pattern.hpp:84
ReLinBin(Space &home, ReLinBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:103
int ModEventDelta
Modification event deltas.
Definition: core.hpp:89
A x0
View of type A.
Definition: linear.hh:68
Council< Advisor > co
Council for managing single advisor.
Definition: linear.hh:790
EqTer(Space &home, EqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:112
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition: int-ter.hpp:70
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:232
static ExecStatus post(Home home, ViewArray< VX > &x, int c, VB b)
Post propagator for .
Definition: bool-int.hpp:639
int c
Righthandside.
Definition: linear.hh:925
BoolView x
Boolean view.
Definition: linear.hh:1135
ViewArray< VX > x
Views not yet subscribed to.
Definition: linear.hh:888
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-int.hpp:172
void update(Space &home, ScaleBoolArray &sba)
Update sba during copying.
Definition: bool-scale.hpp:67
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: int-dom.hpp:382
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:237
Propagator for disequality to Boolean sum (cardinality)
Definition: linear.hh:1078
virtual Actor * copy(Space &home)
Create copy during cloning.
Definition: bool-int.hpp:125
virtual void reschedule(Space &home)
Schedule function.
Definition: bool-int.hpp:289
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:209
ExecStatus
Definition: core.hpp:472
ReGqBoolInt(Space &home, ReGqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:579
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:147
SBAP p
Positive Boolean views with coefficients on left-hand side.
Definition: linear.hh:1223