Generated on Sat Feb 7 2015 02:01:16 for Gecode by doxygen 1.8.9.1
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  * Last modified:
14  * $Date: 2013-02-14 16:29:11 +0100 (Thu, 14 Feb 2013) $ by $Author: schulte $
15  * $Revision: 13292 $
16  *
17  * This file is part of Gecode, the generic constraint
18  * development environment:
19  * http://www.gecode.org
20  *
21  * Permission is hereby granted, free of charge, to any person obtaining
22  * a copy of this software and associated documentation files (the
23  * "Software"), to deal in the Software without restriction, including
24  * without limitation the rights to use, copy, modify, merge, publish,
25  * distribute, sublicense, and/or sell copies of the Software, and to
26  * permit persons to whom the Software is furnished to do so, subject to
27  * the following conditions:
28  *
29  * The above copyright notice and this permission notice shall be
30  * included in all copies or substantial portions of the Software.
31  *
32  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
37  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
38  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39  *
40  */
41 
42 #ifndef __GECODE_INT_LINEAR_HH__
43 #define __GECODE_INT_LINEAR_HH__
44 
45 #include <gecode/int.hh>
46 
52 namespace Gecode { namespace Int { namespace Linear {
53 
54  /*
55  * Binary propagators
56  *
57  */
58 
68  template<class Val, class A, class B, PropCond pc>
69  class LinBin : public Propagator {
70  protected:
72  A x0;
74  B x1;
76  Val c;
78  LinBin(Space& home, bool share, LinBin& p);
80  LinBin(Space& home, bool share, Propagator& p, A x0, B x1, Val c);
82  LinBin(Home home, A x0, B x1, Val c);
83  public:
85  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
87  virtual size_t dispose(Space& home);
88  };
89 
99  template<class Val, class A, class B, PropCond pc, class Ctrl>
100  class ReLinBin : public Propagator {
101  protected:
103  A x0;
105  B x1;
107  Val c;
109  Ctrl b;
111  ReLinBin(Space& home, bool share, ReLinBin& p);
113  ReLinBin(Home home, A x0, B x1, Val c, Ctrl b);
114  public:
116  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
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, bool share, EqBin& p);
143  EqBin(Home home, A x0, B x1, Val c);
144  public:
146  EqBin(Space& home, bool share, Propagator& p, A x0, B x1, Val c);
148  virtual Actor* copy(Space& home, bool share);
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, bool share, ReEqBin& p);
178  ReEqBin(Home home,A,B,Val,Ctrl);
179  public:
181  virtual Actor* copy(Space& home, bool share);
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, bool share, NqBin& p);
210  NqBin(Home home, A x0, B x1, Val c);
211  public:
213  NqBin(Space& home, bool share, Propagator& p, A x0, B x1, Val c);
215  virtual Actor* copy(Space& home, bool share);
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, bool share, LqBin& p);
246  LqBin(Home home, A x0, B x1, Val c);
247  public:
249  LqBin(Space& home, bool share, Propagator& p, A x0, B x1, Val c);
251  virtual Actor* copy(Space& home, bool share);
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, bool share, GqBin& p);
280  GqBin(Home home, A x0, B x1, Val c);
281  public:
283  GqBin(Space& home, bool share, Propagator& p, A x0, B x1, Val c);
285  virtual Actor* copy(Space& home, bool share);
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, bool share, ReLqBin& p);
315  ReLqBin(Home home, A x0, B x1, Val c, BoolView b);
316  public:
318  virtual Actor* copy(Space& home, bool share);
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, bool share, LinTer& p);
359  LinTer(Home home, A x0, B x1, C x2, Val c);
361  LinTer(Space& home, bool share, 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 size_t dispose(Space& home);
367  };
368 
381  template<class Val, class A, class B, class C>
382  class EqTer : public LinTer<Val,A,B,C,PC_INT_BND> {
383  protected:
388 
390  EqTer(Space& home, bool share, EqTer& p);
392  EqTer(Home home, A x0, B x1, C x2, Val c);
393  public:
395  EqTer(Space& home, bool share, Propagator& p, A x0, B x1, C x2, Val c);
397  virtual Actor* copy(Space& home, bool share);
399  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
401  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
402  };
403 
416  template<class Val, class A, class B, class C>
417  class NqTer : public LinTer<Val,A,B,C,PC_INT_VAL> {
418  protected:
423 
425  NqTer(Space& home, bool share, NqTer& p);
427  NqTer(Home home, A x0, B x1, C x2, Val c);
428  public:
430  NqTer(Space& home, bool share, Propagator& p, A x0, B x1, C x2, Val c);
432  virtual Actor* copy(Space& home, bool share);
434  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
436  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
437  };
438 
451  template<class Val, class A, class B, class C>
452  class LqTer : public LinTer<Val,A,B,C,PC_INT_BND> {
453  protected:
458 
460  LqTer(Space& home, bool share, LqTer& p);
462  LqTer(Home home, A x0, B x1, C x2, Val c);
463  public:
465  LqTer(Space& home, bool share, Propagator& p, A x0, B x1, C x2, Val c);
467  virtual Actor* copy(Space& home, bool share);
469  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
471  static ExecStatus post(Home home, A x0, B x1, C x2, Val c);
472  };
473 
474 }}}
475 
477 
478 namespace Gecode { namespace Int { namespace Linear {
479 
480  /*
481  * n-ary propagators
482  *
483  */
484 
494  template<class Val, class P, class N, PropCond pc>
495  class Lin : public Propagator {
496  protected:
502  Val c;
503 
505  Lin(Space& home, bool share, Lin<Val,P,N,pc>& p);
507  Lin(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
508  public:
510  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
512  virtual size_t dispose(Space& home);
513  };
514 
524  template<class Val, class P, class N, PropCond pc, class Ctrl>
525  class ReLin : public Lin<Val,P,N,pc> {
526  protected:
528  Ctrl b;
530  ReLin(Space& home, bool share, ReLin& p);
532  ReLin(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
533  public:
535  virtual size_t dispose(Space& home);
536  };
537 
543  template<class Val, class View>
545  Val& c, Val& sl, Val& su);
546 
552  template<class Val, class View>
554  Val& c, Val& sl, Val& su);
555 
568  template<class Val, class P, class N>
569  class Eq : public Lin<Val,P,N,PC_INT_BND> {
570  protected:
574 
576  Eq(Space& home, bool share, Eq& p);
577  public:
579  Eq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
581  virtual Actor* copy(Space& home, bool share);
583  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
585  static ExecStatus
586  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
587  };
588 
599  template<class Val, class View>
600  class DomEq
601  : public Lin<Val,View,View,PC_INT_DOM> {
602  protected:
606 
608  DomEq(Space& home, bool share, DomEq& p);
609  public:
611  DomEq(Home home, ViewArray<View>& x, ViewArray<View>& y, Val c);
613  virtual Actor* copy(Space& home, bool share);
620  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
622  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
624  static ExecStatus
625  post(Home home, ViewArray<View>& x, ViewArray<View>& y, Val c);
626  };
627 
640  template<class Val, class P, class N, class Ctrl, ReifyMode rm>
641  class ReEq : public ReLin<Val,P,N,PC_INT_BND,Ctrl> {
642  protected:
647 
649  ReEq(Space& home, bool share, ReEq& p);
650  public:
652  ReEq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
654  virtual Actor* copy(Space& home, bool share);
656  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
658  static ExecStatus
659  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, Ctrl b);
660  };
661 
674  template<class Val, class P, class N>
675  class Nq : public Lin<Val,P,N,PC_INT_VAL> {
676  protected:
680 
682  Nq(Space& home, bool share, Nq& p);
683  public:
685  Nq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
687  virtual Actor* copy(Space& home, bool share);
689  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
691  static ExecStatus
692  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
693  };
694 
707  template<class Val, class P, class N>
708  class Lq : public Lin<Val,P,N,PC_INT_BND> {
709  protected:
713 
715  Lq(Space& home, bool share, Lq& p);
716  public:
718  Lq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
720  virtual Actor* copy(Space& home, bool share);
722  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
724  static ExecStatus
725  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c);
726  };
727 
740  template<class Val, class P, class N, ReifyMode rm>
741  class ReLq : public ReLin<Val,P,N,PC_INT_BND,BoolView> {
742  protected:
747 
749  ReLq(Space& home, bool share, ReLq& p);
750  public:
752  ReLq(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, BoolView b);
754  virtual Actor* copy(Space& home, bool share);
756  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
758  static ExecStatus
759  post(Home home, ViewArray<P>& x, ViewArray<N>& y, Val c, BoolView b);
760  };
761 
762 }}}
763 
766 
767 namespace Gecode { namespace Int { namespace Linear {
768 
769  /*
770  * Boolean linear propagators
771  *
772  */
773 
778  template<class VX>
779  class LinBoolInt : public Propagator {
780  protected:
786  int n_as;
788  int n_hs;
790  int c;
792  void normalize(void);
794  LinBoolInt(Space& home, bool share, LinBoolInt& p);
796  LinBoolInt(Home home, ViewArray<VX>& x, int n_s, int c);
797  public:
799  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
801  virtual size_t dispose(Space& home);
802  };
803 
810  template<class VX>
811  class EqBoolInt : public LinBoolInt<VX> {
812  protected:
813  using LinBoolInt<VX>::co;
814  using LinBoolInt<VX>::x;
815  using LinBoolInt<VX>::n_as;
816  using LinBoolInt<VX>::n_hs;
817  using LinBoolInt<VX>::c;
819  EqBoolInt(Space& home, bool share, EqBoolInt& p);
821  EqBoolInt(Home home, ViewArray<VX>& x, int c);
822  public:
824  virtual Actor* copy(Space& home, bool share);
826  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
828  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
830  static ExecStatus post(Home home, ViewArray<VX>& x, int c);
831  };
832 
839  template<class VX>
840  class GqBoolInt : public LinBoolInt<VX> {
841  protected:
842  using LinBoolInt<VX>::co;
843  using LinBoolInt<VX>::x;
844  using LinBoolInt<VX>::n_as;
845  using LinBoolInt<VX>::n_hs;
846  using LinBoolInt<VX>::c;
848  GqBoolInt(Space& home, bool share, GqBoolInt& p);
850  GqBoolInt(Home home, ViewArray<VX>& x, int c);
851  public:
853  virtual Actor* copy(Space& home, bool share);
855  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
857  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
859  static ExecStatus post(Home home, ViewArray<VX>& x, int c);
860  };
861 
868  template<class VX>
869  class NqBoolInt : public BinaryPropagator<VX,PC_INT_VAL> {
870  protected:
876  int c;
878  bool resubscribe(Space& home, VX& y);
880  NqBoolInt(Home home, ViewArray<VX>& b, int c);
882  NqBoolInt(Space& home, bool share, NqBoolInt<VX>& p);
883  public:
885  virtual Actor* copy(Space& home, bool share);
887  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
889  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
891  static ExecStatus post(Home home, ViewArray<VX>& b, int c);
893  virtual size_t dispose(Space& home);
894  };
895 
896 
901  template<class VX, class VB>
902  class ReLinBoolInt : public Propagator {
903  protected:
909  int n_s;
911  int c;
913  VB b;
915  void normalize(void);
917  ReLinBoolInt(Space& home, bool share, ReLinBoolInt& p);
919  ReLinBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
920  public:
922  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
924  virtual size_t dispose(Space& home);
925  };
926 
927 
931  template<class BV>
932  class BoolNegTraits {};
933 
940  template<class VX, class VB, ReifyMode rm>
941  class ReGqBoolInt : public ReLinBoolInt<VX,VB> {
942  protected:
950  ReGqBoolInt(Space& home, bool share, ReGqBoolInt& p);
952  ReGqBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
953  public:
955  virtual Actor* copy(Space& home, bool share);
957  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
959  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
961  static ExecStatus post(Home home, ViewArray<VX>& x, int c, VB b);
962  };
963 
970  template<class VX, class VB, ReifyMode rm>
971  class ReEqBoolInt : public ReLinBoolInt<VX,VB> {
972  protected:
980  ReEqBoolInt(Space& home, bool share, ReEqBoolInt& p);
982  ReEqBoolInt(Home home, ViewArray<VX>& x, int c, VB b);
983  public:
985  virtual Actor* copy(Space& home, bool share);
987  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
989  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
991  static ExecStatus post(Home home, ViewArray<VX>& x, int c, VB b);
992  };
993 
994 }}}
995 
997 
998 namespace Gecode { namespace Int { namespace Linear {
999 
1004  template<class XV, class YV>
1005  class LinBoolView : public Propagator {
1006  protected:
1010  YV y;
1012  int c;
1014  LinBoolView(Space& home, bool share, LinBoolView& p);
1016  LinBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1017  public:
1019  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
1021  virtual size_t dispose(Space& home);
1022  };
1023 
1024 
1031  template<class XV, class YV>
1032  class EqBoolView : public LinBoolView<XV,YV> {
1033  protected:
1034  using LinBoolView<XV,YV>::x;
1035  using LinBoolView<XV,YV>::y;
1036  using LinBoolView<XV,YV>::c;
1037 
1039  EqBoolView(Space& home, bool share, EqBoolView& p);
1041  EqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1042  public:
1044  virtual Actor* copy(Space& home, bool share);
1046  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1048  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1049  };
1050 
1057  template<class XV, class YV>
1058  class NqBoolView : public LinBoolView<XV,YV> {
1059  protected:
1060  using LinBoolView<XV,YV>::x;
1061  using LinBoolView<XV,YV>::y;
1062  using LinBoolView<XV,YV>::c;
1063 
1065  NqBoolView(Space& home, bool share, NqBoolView& p);
1067  NqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1068  public:
1070  virtual Actor* copy(Space& home, bool share);
1072  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1074  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1075  };
1076 
1083  template<class XV, class YV>
1084  class GqBoolView : public LinBoolView<XV,YV> {
1085  protected:
1086  using LinBoolView<XV,YV>::x;
1087  using LinBoolView<XV,YV>::y;
1088  using LinBoolView<XV,YV>::c;
1089 
1091  GqBoolView(Space& home, bool share, GqBoolView& p);
1093  GqBoolView(Home home, ViewArray<XV>& x, YV y, int c);
1094  public:
1096  virtual Actor* copy(Space& home, bool share);
1098  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1100  static ExecStatus post(Home home, ViewArray<XV>& x, YV y, int c);
1101  };
1102 
1103 }}}
1104 
1106 
1107 namespace Gecode { namespace Int { namespace Linear {
1108 
1110  class ScaleBool {
1111  public:
1113  int a;
1116  };
1117 
1120  private:
1122  ScaleBool* _fst;
1124  ScaleBool* _lst;
1125  public:
1127  ScaleBoolArray(void);
1129  ScaleBoolArray(Space& home, int n);
1131  void subscribe(Space& home, Propagator& p);
1133  void cancel(Space& home, Propagator& p);
1135  void update(Space& home, bool share, ScaleBoolArray& sba);
1137  ScaleBool* fst(void) const;
1139  ScaleBool* lst(void) const;
1141  void fst(ScaleBool* f);
1143  void lst(ScaleBool* l);
1145  bool empty(void) const;
1147  int size(void) const;
1148  private:
1150  class ScaleDec {
1151  public:
1152  bool
1153  operator ()(const ScaleBool& x, const ScaleBool& y);
1154  };
1155  public:
1157  void sort(void);
1158  };
1159 
1160 
1163  public:
1165  EmptyScaleBoolArray(void);
1167  EmptyScaleBoolArray(Space& home, int n);
1169  void subscribe(Space& home, Propagator& p);
1171  void cancel(Space& home, Propagator& p);
1173  void update(Space& home, bool share, EmptyScaleBoolArray& esba);
1175  ScaleBool* fst(void) const;
1177  ScaleBool* lst(void) const;
1179  void fst(ScaleBool* f);
1181  void lst(ScaleBool* l);
1183  bool empty(void) const;
1185  int size(void) const;
1187  void sort(void);
1188  };
1189 
1190 
1195  template<class SBAP, class SBAN, class VX, PropCond pcx>
1196  class LinBoolScale : public Propagator {
1197  protected:
1199  SBAP p;
1201  SBAN n;
1203  VX x;
1205  int c;
1206  public:
1208  LinBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1210  LinBoolScale(Space& home, bool share, Propagator& pr,
1211  SBAP& p, SBAN& n, VX x, int c);
1213  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
1215  virtual size_t dispose(Space& home);
1216  };
1217 
1224  template<class SBAP, class SBAN, class VX>
1225  class EqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_BND> {
1226  protected:
1231  public:
1233  EqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1235  EqBoolScale(Space& home, bool share, Propagator& pr,
1236  SBAP& p, SBAN& n, VX x, int c);
1238  virtual Actor* copy(Space& home, bool share);
1240  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1242  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1243  };
1244 
1251  template<class SBAP, class SBAN, class VX>
1252  class LqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_BND> {
1253  protected:
1258  public:
1260  LqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1262  LqBoolScale(Space& home, bool share, Propagator& pr,
1263  SBAP& p, SBAN& n, VX x, int c);
1265  virtual Actor* copy(Space& home, bool share);
1267  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1269  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1270  };
1271 
1278  template<class SBAP, class SBAN, class VX>
1279  class NqBoolScale : public LinBoolScale<SBAP,SBAN,VX,PC_INT_VAL> {
1280  protected:
1285  public:
1287  NqBoolScale(Home home, SBAP& p, SBAN& n, VX x, int c);
1289  NqBoolScale(Space& home, bool share, Propagator& pr,
1290  SBAP& p, SBAN& n, VX x, int c);
1292  virtual Actor* copy(Space& home, bool share);
1294  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
1296  static ExecStatus post(Home home, SBAP& p, SBAN& n, VX x, int c);
1297  };
1298 
1299 }}}
1300 
1302 
1303 namespace Gecode { namespace Int { namespace Linear {
1304 
1309  template<class View>
1310  class Term {
1311  public:
1313  int a;
1315  View x;
1316  };
1317 
1332  template<class View>
1333  void estimate(Term<View>* t, int n, int c,
1334  int& l, int& u);
1335 
1363  GECODE_INT_EXPORT void
1364  post(Home home, Term<IntView>* t, int n, IntRelType irt, int c,
1366 
1396  GECODE_INT_EXPORT void
1397  post(Home home, Term<IntView>* t, int n, IntRelType irt, int c, Reify r,
1399 
1427  GECODE_INT_EXPORT void
1428  post(Home home, Term<BoolView>* t, int n, IntRelType irt, int c,
1430 
1459  GECODE_INT_EXPORT void
1460  post(Home home, Term<BoolView>* t, int n, IntRelType irt, int c, Reify r,
1462 
1491  GECODE_INT_EXPORT void
1492  post(Home home, Term<BoolView>* t, int n, IntRelType irt, IntView y, int c=0,
1494 
1523  GECODE_INT_EXPORT void
1524  post(Home home, Term<BoolView>* t, int n, IntRelType irt, IntView y,
1526 
1527 }}}
1528 
1529 #include <gecode/int/linear/post.hpp>
1530 
1531 #endif
1532 
1533 // STATISTICS: int-prop
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:278
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:676
Propagator for bounds consistent binary linear disequality
Definition: linear.hh:201
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:131
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:180
ViewArray< VX > x
Boolean views.
Definition: linear.hh:784
Council of advisors
Definition: core.hpp:226
ReEq(Space &home, bool share, ReEq &p)
Constructor for cloning p.
Definition: int-nary.hpp:416
void sort(void)
Sort array in decreasing order of coefficients.
Definition: bool-scale.hpp:143
NodeType t
Type of node.
Definition: bool-expr.cpp:234
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:472
ViewArray< XV > x
Boolean views.
Definition: linear.hh:1008
Propagator for inequality to Boolean sum with coefficients
Definition: linear.hh:1252
BoolView x
Boolean view.
Definition: linear.hh:1115
Propagator for bounds consistent n-ary linear equality
Definition: linear.hh:569
Lq(Space &home, bool share, Lq &p)
Constructor for cloning p.
Definition: int-nary.hpp:636
IntConLevel
Consistency levels for integer propagators.
Definition: int.hh:937
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: int-bin.hpp:71
bool empty(void) const
Test whether array is empty.
Definition: bool-scale.hpp:139
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-int.hpp:408
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-ter.hpp:249
Empty array of scale Boolean views.
Definition: linear.hh:1162
ViewArray< N > y
Array of negative views.
Definition: linear.hh:500
Propagator for reified bounds consistent n-ary linear less or equal
Definition: linear.hh:741
GqBoolInt(Space &home, bool share, GqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:124
Propagator for bounds consistent binary linear greater or equal
Definition: linear.hh:271
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:269
int n_s
Number of subscriptions.
Definition: linear.hh:909
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-ter.hpp:193
NqBoolInt(Home home, ViewArray< VX > &b, int c)
Constructor for posting.
Definition: bool-int.hpp:339
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:247
Base-class for Boolean linear propagators.
Definition: linear.hh:1005
void post(Home home, Term< BoolView > *t, int n, IntRelType irt, IntView x, int c, IntConLevel)
Post propagator for linear constraint over Booleans.
Definition: bool-post.cpp:608
void subscribe(Space &home, Propagator &p)
Subscribe propagator p.
Definition: bool-scale.hpp:125
B x1
View of type B.
Definition: linear.hh:74
int a
Coefficient.
Definition: linear.hh:1313
Propagator for bounds consistent n-ary linear disequality
Definition: linear.hh:675
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high unary)
Definition: bool-int.hpp:98
Propagator for domain consistent n-ary linear equality
Definition: linear.hh:600
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:392
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:104
Baseclass for integer Boolean sum.
Definition: linear.hh:779
static ExecStatus post(Home home, ViewArray< VX > &x, int c, VB b)
Post propagator for .
Definition: bool-int.hpp:615
static ExecStatus post(Home home, ViewArray< VX > &x, int c, VB b)
Post propagator for .
Definition: bool-int.hpp:713
static ExecStatus post(Home home, ViewArray< VX > &x, int c)
Post propagator for .
Definition: bool-int.hpp:302
Propagator for integer disequal to Boolean sum (cardinality)
Definition: linear.hh:869
static ExecStatus post(Home home, A x0, B x1, Val c, BoolView b)
Post propagator for .
Definition: int-bin.hpp:413
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:689
Propagator for bounds consistent ternary linear equality
Definition: linear.hh:382
LqBin(Space &home, bool share, LqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:329
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-dom.hpp:380
GqBin(Space &home, bool share, GqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:375
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:135
Base-class for reified n-ary linear propagators.
Definition: linear.hh:525
EqBoolView(Space &home, bool share, EqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:120
Base-class for propagators.
Definition: core.hpp:755
YV y
View to compare number of assigned Boolean views to.
Definition: linear.hh:1010
void sort(void)
Sort array in decreasing order of coefficients.
Definition: bool-scale.hpp:110
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:542
Base-class for advisors.
Definition: core.hpp:926
Base-class for ternary linear propagators.
Definition: linear.hh:346
ReGqBoolInt(Space &home, bool share, ReGqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:562
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:432
int size(void) const
Return number of elements.
Definition: bool-scale.hpp:100
void cancel(Space &home, Propagator &p)
Cancel propagator p.
Definition: bool-scale.hpp:61
ReEqBoolInt(Space &home, bool share, ReEqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:664
GqBoolView(Space &home, bool share, GqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:283
ScaleBool * lst(void) const
Return pointer after last element.
Definition: bool-scale.hpp:133
Base-class for n-ary linear propagators.
Definition: linear.hh:495
ReLinBoolInt(Space &home, bool share, ReLinBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:499
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:87
Propagator for bounds consistent binary linear equality
Definition: linear.hh:134
EqTer(Space &home, bool share, EqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:109
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:510
Computation spaces.
Definition: core.hpp:1362
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:586
LinTer(Space &home, bool share, LinTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:55
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:346
Base-class for binary linear propagators.
Definition: linear.hh:69
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: bool-int.hpp:402
Propagator for equality to Boolean sum (cardinality)
Definition: linear.hh:1032
Base-class for both propagators and branchers.
Definition: core.hpp:666
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:428
int c
Integer constant on right-hand side.
Definition: linear.hh:1205
Propagator for equality to Boolean sum with coefficients
Definition: linear.hh:1225
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:256
Gecode::IntSet d(v, 7)
ViewArray< P > x
Array of positive views.
Definition: linear.hh:498
static ExecStatus post(Home home, ViewArray< XV > &x, YV y, int c)
Post propagator for .
Definition: bool-view.hpp:173
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-nary.hpp:370
Council< Advisor > co
Council for single advisor.
Definition: linear.hh:905
Propagator for bounds consistent ternary linear less or equal
Definition: linear.hh:452
Gecode::FloatVal c(-8, 8)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:383
Propagator for greater or equal to Boolean sum (cardinality)
Definition: linear.hh:1084
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-bin.hpp:77
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-bin.hpp:116
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c, BoolView b)
Post propagator for .
Definition: int-nary.hpp:818
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-ter.hpp:81
int n_as
Number of active subscriptions.
Definition: linear.hh:786
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:456
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-view.hpp:71
LqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:413
int c
Righthandside (constant part from Boolean views assigned to 1)
Definition: linear.hh:1012
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-int.hpp:129
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:226
void bounds_n(ModEventDelta med, ViewArray< View > &y, Val &c, Val &sl, Val &su)
Definition: int-nary.hpp:150
EqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:198
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:675
EqBoolInt(Space &home, bool share, EqBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:236
IntRelType
Relation types for integers.
Definition: int.hh:903
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
Binary propagator.
Definition: propagator.hpp:87
Propagator for integer less or equal to Boolean sum (cardinality)
Definition: linear.hh:840
Propagator for integer equal to Boolean sum (cardinality)
Definition: linear.hh:811
ScaleBool * fst(void) const
Return pointer to first element.
Definition: bool-scale.hpp:131
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-view.hpp:125
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:220
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:439
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-scale.hpp:582
ScaleBool * fst(void) const
Return pointer to first element.
Definition: bool-scale.hpp:80
NqBoolView(Space &home, bool share, NqBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:206
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:764
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:236
Propagator for bounds consistent binary linear less or equal
Definition: linear.hh:237
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: int-bin.hpp:110
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:610
A x0
View of type A.
Definition: linear.hh:349
Reification specification.
Definition: int.hh:854
int c
Righthandside.
Definition: linear.hh:790
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-dom.hpp:395
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-nary.hpp:573
ScaleBoolArray(void)
Default constructor.
Definition: bool-scale.hpp:45
ReLinBin(Space &home, bool share, ReLinBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:100
static ExecStatus post(Home home, ViewArray< VX > &x, int c)
Post propagator for .
Definition: bool-int.hpp:191
NqTer(Space &home, bool share, NqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:188
bool resubscribe(Space &home, VX &y)
Update subscription.
Definition: bool-int.hpp:414
Propagator for reified bounds consistent n-ary linear equality
Definition: linear.hh:641
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:282
static ExecStatus post(Home home, A x0, B x1, Val c, Ctrl b)
Post propagator for .
Definition: int-bin.hpp:206
B x1
View of type B.
Definition: linear.hh:351
void subscribe(Space &home, Propagator &p)
Subscribe propagator p.
Definition: bool-scale.hpp:56
Nq(Space &home, bool share, Nq &p)
Constructor for cloning p.
Definition: int-nary.hpp:487
void normalize(void)
Normalize by removing unused views.
Definition: bool-int.hpp:486
DomEq(Space &home, bool share, DomEq &p)
Constructor for cloning p.
Definition: int-dom.hpp:375
B x1
View of type B.
Definition: linear.hh:105
void bounds_p(ModEventDelta med, ViewArray< View > &x, Val &c, Val &sl, Val &su)
Definition: int-nary.hpp:129
Propagator for reified integer less or equal to Boolean sum (cardinality)
Definition: linear.hh:941
void normalize(void)
Normalize by removing unused views.
Definition: bool-int.hpp:62
Propagator for reified integer equal to Boolean sum (cardinality)
Definition: linear.hh:971
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition: int-dom.hpp:386
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-nary.hpp:116
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:586
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-ter.hpp:120
Propagator for disequality to Boolean sum with coefficients
Definition: linear.hh:1279
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: int-nary.hpp:81
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-int.hpp:670
SBAN n
Negative Boolean views with coefficients on left-hand side.
Definition: linear.hh:1201
Baseclass for reified integer Boolean sum.
Definition: linear.hh:902
Propagator for reified bounds consistent binary linear less or equal
Definition: linear.hh:305
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:426
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:735
EmptyScaleBoolArray(void)
Default constructor.
Definition: bool-scale.hpp:121
Base class for linear Boolean constraints with coefficients.
Definition: linear.hh:1196
void update(Space &home, bool share, ScaleBoolArray &sba)
Update sba during copying.
Definition: bool-scale.hpp:66
static ExecStatus post(Home home, ViewArray< View > &x, ViewArray< View > &y, Val c)
Post propagator for .
Definition: int-dom.hpp:366
Lin(Space &home, bool share, Lin< Val, P, N, pc > &p)
Constructor for cloning p.
Definition: int-nary.hpp:73
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
Eq(Space &home, bool share, Eq &p)
Constructor for cloning p.
Definition: int-nary.hpp:284
Integer view for integer variables.
Definition: view.hpp:129
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-scale.hpp:171
static ExecStatus post(Home home, ViewArray< VX > &b, int c)
Post propagator for .
Definition: bool-int.hpp:375
Val c
Value of type Val.
Definition: linear.hh:107
Array of scale Boolean views.
Definition: linear.hh:1119
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c, Ctrl b)
Post propagator for .
Definition: int-nary.hpp:400
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:262
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:136
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-int.hpp:568
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
SBAP p
Positive Boolean views with coefficients on left-hand side.
Definition: linear.hh:1199
Generic domain change information to be supplied to advisors.
Definition: core.hpp:275
Traits for Boolean negation view.
Definition: linear.hh:932
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:217
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-int.hpp:176
ScaleBool * lst(void) const
Return pointer after last element.
Definition: bool-scale.hpp:84
static ExecStatus post(Home home, ViewArray< P > &x, ViewArray< N > &y, Val c)
Post propagator for .
Definition: int-nary.hpp:621
Propagation cost.
Definition: core.hpp:537
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-nary.hpp:839
static ExecStatus post(Home home, A x0, B x1, C x2, Val c)
Post propagator for .
Definition: int-ter.hpp:101
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-nary.hpp:845
Base-class for reified binary linear propagators.
Definition: linear.hh:100
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-scale.hpp:428
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:177
ExecStatus
Definition: core.hpp:523
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:265
ReLq(Space &home, bool share, ReLq &p)
Constructor for cloning p.
Definition: int-nary.hpp:834
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:155
void estimate(Term< View > *t, int n, int c, int &l, int &u)
Estimate lower and upper bounds.
Definition: post.hpp:45
Ctrl b
Control view for reification.
Definition: linear.hh:109
The default consistency for a constraint.
Definition: int.hh:941
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:144
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-int.hpp:241
Propagator for reified bounds consistent binary linear equality
Definition: linear.hh:168
LinBoolInt(Space &home, bool share, LinBoolInt &p)
Constructor for cloning p.
Definition: bool-int.hpp:88
bool empty(void) const
Test whether array is empty.
Definition: bool-scale.hpp:96
Coefficient and Boolean view.
Definition: linear.hh:1110
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:334
NqBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:567
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: bool-int.hpp:574
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-view.hpp:288
Val c
Constant value.
Definition: linear.hh:502
void cancel(Space &home, Propagator &p)
Cancel propagator p.
Definition: bool-scale.hpp:127
Council< Advisor > co
Council for managing single advisor.
Definition: linear.hh:782
int n_hs
Number of views that have or had subscriptions.
Definition: linear.hh:788
Ctrl b
Control view for reification.
Definition: linear.hh:528
Class for describing linear term .
Definition: linear.hh:1310
ViewArray< VX > x
Views not yet subscribed to.
Definition: linear.hh:874
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-view.hpp:294
LinBoolView(Space &home, bool share, LinBoolView &p)
Constructor for cloning p.
Definition: bool-view.hpp:63
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-nary.hpp:722
int size(void) const
Return number of elements.
Definition: bool-scale.hpp:141
Val c
Value of type Val.
Definition: linear.hh:355
ReLin(Space &home, bool share, ReLin &p)
Constructor for cloning p.
Definition: int-nary.hpp:109
A x0
View of type A.
Definition: linear.hh:72
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-bin.hpp:380
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
LinBin(Space &home, bool share, LinBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:54
Gecode toplevel namespace
A x0
View of type A.
Definition: linear.hh:103
Propagator for bounds consistent n-ary linear less or equal
Definition: linear.hh:708
void update(Space &home, bool share, EmptyScaleBoolArray &esba)
Update sba during copying.
Definition: bool-scale.hpp:129
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-view.hpp:54
NqBin(Space &home, bool share, NqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:273
Propagator for disequality to Boolean sum (cardinality)
Definition: linear.hh:1058
Val c
Value of type Val.
Definition: linear.hh:76
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: int-bin.hpp:292
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:321
int a
Integer coefficient.
Definition: linear.hh:1113
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Definition: bool-scale.hpp:164
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high unary)
Definition: bool-int.hpp:521
#define GECODE_INT_EXPORT
Definition: int.hh:78
LinBoolScale(Home home, SBAP &p, SBAN &n, VX x, int c)
Constructor for creation.
Definition: bool-scale.hpp:153
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: bool-int.hpp:349
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: int-nary.hpp:422
Propagator for bounds consistent ternary linear disquality
Definition: linear.hh:417
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-ter.hpp:206
static ExecStatus post(Home home, A x0, B x1, Val c)
Post propagator for .
Definition: int-bin.hpp:367
static ExecStatus post(Home home, SBAP &p, SBAN &n, VX x, int c)
Post propagator.
Definition: bool-scale.hpp:387
ReLqBin(Space &home, bool share, ReLqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:421
Home class for posting propagators
Definition: core.hpp:717
ReEqBin(Space &home, bool share, ReEqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:214
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: int-nary.hpp:87
VX x
Integer view on right-hand side.
Definition: linear.hh:1203
VB b
Control variable.
Definition: linear.hh:913
C x2
View of type C.
Definition: linear.hh:353
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int c
Righthandside.
Definition: linear.hh:876
LqTer(Space &home, bool share, LqTer &p)
Constructor for cloning p.
Definition: int-ter.hpp:244
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: int-bin.hpp:298
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-view.hpp:211
EqBin(Space &home, bool share, EqBin &p)
Constructor for cloning p.
Definition: int-bin.hpp:144
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Definition: bool-scale.hpp:213
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: bool-scale.hpp:241
Boolean view for Boolean variables.
Definition: view.hpp:1315
ViewArray< VX > x
Views.
Definition: linear.hh:907
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition: int-ter.hpp:75