Generated on Sat Feb 7 2015 02:01:18 for Gecode by doxygen 1.8.9.1
view.hpp
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  *
6  * Copyright:
7  * Christian Schulte, 2005
8  *
9  * Last modified:
10  * $Date: 2013-02-14 17:04:32 +0100 (Thu, 14 Feb 2013) $ by $Author: schulte $
11  * $Revision: 13297 $
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 #include <iostream>
39 
40 namespace Gecode { namespace Int {
41 
53  template<class View>
54  class ViewRanges {
55  public:
57 
58  ViewRanges(void);
61  ViewRanges(const View& x);
63  void init(const View& x);
65 
67 
68  bool operator ()(void) const;
71  void operator ++(void);
73 
75 
76  int min(void) const;
79  int max(void) const;
81  unsigned int width(void) const;
83  };
84 
93  template<class View>
94  class ViewValues : public Iter::Ranges::ToValues<ViewRanges<View> > {
95  public:
97 
98  ViewValues(void);
101  ViewValues(const View& x);
103  void init(const View& x);
105  };
106 
107 }}
108 
109 #include <gecode/int/view/iter.hpp>
110 
111 namespace Gecode { namespace Int {
112 
129  class IntView : public VarImpView<IntVar> {
130  protected:
131  using VarImpView<IntVar>::x;
132  public:
134 
135  IntView(void);
138  IntView(const IntVar& y);
140  IntView(IntVarImp* y);
142 
144 
145  int min(void) const;
148  int max(void) const;
150  int med(void) const;
152  int val(void) const;
153 
155  unsigned int size(void) const;
157  unsigned int width(void) const;
159  unsigned int regret_min(void) const;
161  unsigned int regret_max(void) const;
163 
165 
166  bool range(void) const;
168 
170  bool in(int n) const;
172  bool in(long long int n) const;
174 
176 
177  ModEvent lq(Space& home, int n);
180  ModEvent lq(Space& home, long long int n);
181 
183  ModEvent le(Space& home, int n);
185  ModEvent le(Space& home, long long int n);
186 
188  ModEvent gq(Space& home, int n);
190  ModEvent gq(Space& home, long long int n);
191 
193  ModEvent gr(Space& home, int n);
195  ModEvent gr(Space& home, long long int n);
196 
198  ModEvent nq(Space& home, int n);
200  ModEvent nq(Space& home, long long int n);
201 
203  ModEvent eq(Space& home, int n);
205  ModEvent eq(Space& home, long long int n);
207 
223  template<class I>
225  ModEvent narrow_r(Space& home, I& i, bool depends=true);
227  template<class I>
228  ModEvent inter_r(Space& home, I& i, bool depends=true);
230  template<class I>
231  ModEvent minus_r(Space& home, I& i, bool depends=true);
233  template<class I>
234  ModEvent narrow_v(Space& home, I& i, bool depends=true);
236  template<class I>
237  ModEvent inter_v(Space& home, I& i, bool depends=true);
239  template<class I>
240  ModEvent minus_v(Space& home, I& i, bool depends=true);
242 
244 
245  int min(const Delta& d) const;
248  int max(const Delta& d) const;
250  bool any(const Delta& d) const;
252 
254 
255  static ModEventDelta med(ModEvent me);
258  };
259 
264  template<class Char, class Traits>
265  std::basic_ostream<Char,Traits>&
266  operator <<(std::basic_ostream<Char,Traits>& os, const IntView& x);
267 
268 
276  class MinusView : public DerivedView<IntView> {
277  protected:
279  public:
281 
282  MinusView(void);
285  explicit MinusView(const IntView& y);
287 
289 
290  int min(void) const;
293  int max(void) const;
295  int med(void) const;
297  int val(void) const;
298 
300  unsigned int size(void) const;
302  unsigned int width(void) const;
304  unsigned int regret_min(void) const;
306  unsigned int regret_max(void) const;
308 
310 
311  bool range(void) const;
313 
315  bool in(int n) const;
317  bool in(long long int n) const;
319 
321 
322  ModEvent lq(Space& home, int n);
325  ModEvent lq(Space& home, long long int n);
326 
328  ModEvent le(Space& home, int n);
330  ModEvent le(Space& home, long long int n);
331 
333  ModEvent gq(Space& home, int n);
335  ModEvent gq(Space& home, long long int n);
336 
338  ModEvent gr(Space& home, int n);
340  ModEvent gr(Space& home, long long int n);
341 
343  ModEvent nq(Space& home, int n);
345  ModEvent nq(Space& home, long long int n);
346 
348  ModEvent eq(Space& home, int n);
350  ModEvent eq(Space& home, long long int n);
352 
368  template<class I>
370  ModEvent narrow_r(Space& home, I& i, bool depends=true);
372  template<class I>
373  ModEvent inter_r(Space& home, I& i, bool depends=true);
375  template<class I>
376  ModEvent minus_r(Space& home, I& i, bool depends=true);
378  template<class I>
379  ModEvent narrow_v(Space& home, I& i, bool depends=true);
381  template<class I>
382  ModEvent inter_v(Space& home, I& i, bool depends=true);
384  template<class I>
385  ModEvent minus_v(Space& home, I& i, bool depends=true);
387 
389 
390  static ModEventDelta med(ModEvent me);
393 
395 
396  int min(const Delta& d) const;
399  int max(const Delta& d) const;
401  bool any(const Delta& d) const;
403  };
404 
409  template<class Char, class Traits>
410  std::basic_ostream<Char,Traits>&
411  operator <<(std::basic_ostream<Char,Traits>& os, const MinusView& x);
412 
413 
422  class OffsetView : public DerivedView<IntView> {
423  protected:
425  int c;
427  public:
429 
430  OffsetView(void);
433  OffsetView(const IntView& y, int c);
435 
437 
438  int offset(void) const;
441  void offset(int n);
443  int min(void) const;
445  int max(void) const;
447  int med(void) const;
449  int val(void) const;
450 
452  unsigned int size(void) const;
454  unsigned int width(void) const;
456  unsigned int regret_min(void) const;
458  unsigned int regret_max(void) const;
460 
462 
463  bool range(void) const;
465 
467  bool in(int n) const;
469  bool in(long long int n) const;
471 
473 
474  ModEvent lq(Space& home, int n);
477  ModEvent lq(Space& home, long long int n);
478 
480  ModEvent le(Space& home, int n);
482  ModEvent le(Space& home, long long int n);
483 
485  ModEvent gq(Space& home, int n);
487  ModEvent gq(Space& home, long long int n);
488 
490  ModEvent gr(Space& home, int n);
492  ModEvent gr(Space& home, long long int n);
493 
495  ModEvent nq(Space& home, int n);
497  ModEvent nq(Space& home, long long int n);
498 
500  ModEvent eq(Space& home, int n);
502  ModEvent eq(Space& home, long long int n);
504 
520  template<class I>
522  ModEvent narrow_r(Space& home, I& i, bool depends=true);
524  template<class I>
525  ModEvent inter_r(Space& home, I& i, bool depends=true);
527  template<class I>
528  ModEvent minus_r(Space& home, I& i, bool depends=true);
530  template<class I>
531  ModEvent narrow_v(Space& home, I& i, bool depends=true);
533  template<class I>
534  ModEvent inter_v(Space& home, I& i, bool depends=true);
536  template<class I>
537  ModEvent minus_v(Space& home, I& i, bool depends=true);
539 
541 
542  static ModEventDelta med(ModEvent me);
545 
547 
548  int min(const Delta& d) const;
551  int max(const Delta& d) const;
553  bool any(const Delta& d) const;
555 
557 
558  void update(Space& home, bool share, OffsetView& y);
561  };
562 
567  template<class Char, class Traits>
568  std::basic_ostream<Char,Traits>&
569  operator <<(std::basic_ostream<Char,Traits>& os, const OffsetView& x);
570 
575  bool same(const OffsetView& x, const OffsetView& y);
578  bool before(const OffsetView& x, const OffsetView& y);
580 
584  template<class View>
585  class NoOffset {
586  public:
588  typedef View ViewType;
590  View& operator ()(View& x);
592  void update(const NoOffset&);
594  int offset(void) const;
595  };
596 
597  template<class View>
598  forceinline View&
600  return x;
601  }
602 
603  template<class View>
604  forceinline void
606 
607  template<class View>
608  forceinline int
610  return 0;
611  }
612 
613 
617  class Offset {
618  public:
622  int c;
624  Offset(int off = 0);
628  void update(const Offset& o);
630  int offset(void) const;
631  };
632 
634  Offset::Offset(int off) : c(off) {}
635 
636  forceinline void
637  Offset::update(const Offset& o) { c = o.c; }
638 
639  forceinline int
640  Offset::offset(void) const { return c; }
641 
644  return OffsetView(x,c);
645  }
646 
670  template<class Val, class UnsVal>
671  class ScaleView : public DerivedView<IntView> {
672  protected:
675  int a;
676  public:
678 
679  ScaleView(void);
682  ScaleView(int b, const IntView& y);
684 
686 
687  int scale(void) const;
690  Val min(void) const;
692  Val max(void) const;
694  Val med(void) const;
696  Val val(void) const;
697 
699  UnsVal size(void) const;
701  UnsVal width(void) const;
703  UnsVal regret_min(void) const;
705  UnsVal regret_max(void) const;
707 
709 
710  bool range(void) const;
713  bool in(Val n) const;
715 
717 
718  ModEvent lq(Space& home, Val n);
721  ModEvent le(Space& home, Val n);
723  ModEvent gq(Space& home, Val n);
725  ModEvent gr(Space& home, Val n);
727  ModEvent nq(Space& home, Val n);
729  ModEvent eq(Space& home, Val n);
731 
733 
734  static ModEventDelta med(ModEvent me);
737 
739 
740  Val min(const Delta& d) const;
743  Val max(const Delta& d) const;
745  bool any(const Delta& d) const;
747 
749 
750  void update(Space& home, bool share, ScaleView<Val,UnsVal>& y);
753  };
754 
760 
766 
771  template<class Char, class Traits>
772  std::basic_ostream<Char,Traits>&
773  operator <<(std::basic_ostream<Char,Traits>& os, const IntScaleView& x);
774 
779  template<class Char, class Traits>
780  std::basic_ostream<Char,Traits>&
781  operator <<(std::basic_ostream<Char,Traits>& os, const LLongScaleView& x);
782 
787  template<class Val, class UnsVal>
789  bool same(const ScaleView<Val,UnsVal>& x, const ScaleView<Val,UnsVal>& y);
791  template<class Val, class UnsVal>
792  bool before(const ScaleView<Val,UnsVal>& x, const ScaleView<Val,UnsVal>& y);
794 
795 
796 
804  class ConstIntView : public ConstView<IntView> {
805  protected:
806  int x;
807  public:
809 
810  ConstIntView(void);
813  ConstIntView(int n);
815 
817 
818  int min(void) const;
821  int max(void) const;
823  int med(void) const;
825  int val(void) const;
826 
828  unsigned int size(void) const;
830  unsigned int width(void) const;
832  unsigned int regret_min(void) const;
834  unsigned int regret_max(void) const;
836 
838 
839  bool range(void) const;
842  bool in(int n) const;
844  bool in(long long int n) const;
846 
848 
849  ModEvent lq(Space& home, int n);
852  ModEvent lq(Space& home, long long int n);
853 
855  ModEvent le(Space& home, int n);
857  ModEvent le(Space& home, long long int n);
858 
860  ModEvent gq(Space& home, int n);
862  ModEvent gq(Space& home, long long int n);
863 
865  ModEvent gr(Space& home, int n);
867  ModEvent gr(Space& home, long long int n);
868 
870  ModEvent nq(Space& home, int n);
872  ModEvent nq(Space& home, long long int n);
873 
875  ModEvent eq(Space& home, int n);
877  ModEvent eq(Space& home, long long int n);
879 
895  template<class I>
897  ModEvent narrow_r(Space& home, I& i, bool depends=true);
899  template<class I>
900  ModEvent inter_r(Space& home, I& i, bool depends=true);
902  template<class I>
903  ModEvent minus_r(Space& home, I& i, bool depends=true);
905  template<class I>
906  ModEvent narrow_v(Space& home, I& i, bool depends=true);
908  template<class I>
909  ModEvent inter_v(Space& home, I& i, bool depends=true);
911  template<class I>
912  ModEvent minus_v(Space& home, I& i, bool depends=true);
914 
916 
917  int min(const Delta& d) const;
920  int max(const Delta& d) const;
922  bool any(const Delta& d) const;
924 
926 
927  void update(Space& home, bool share, ConstIntView& y);
930  };
931 
936  template<class Char, class Traits>
937  std::basic_ostream<Char,Traits>&
938  operator <<(std::basic_ostream<Char,Traits>& os, const ConstIntView& x);
939 
945  bool same(const ConstIntView& x, const ConstIntView& y);
948  bool before(const ConstIntView& x, const ConstIntView& y);
950 
951 
959  class ZeroIntView : public ConstView<IntView> {
960  public:
962 
963  ZeroIntView(void);
966 
968 
969  int min(void) const;
972  int max(void) const;
974  int med(void) const;
976  int val(void) const;
977 
979  unsigned int size(void) const;
981  unsigned int width(void) const;
983  unsigned int regret_min(void) const;
985  unsigned int regret_max(void) const;
987 
989 
990  bool range(void) const;
993  bool in(int n) const;
995  bool in(long long int n) const;
997 
999 
1000  ModEvent lq(Space& home, int n);
1003  ModEvent lq(Space& home, long long int n);
1004 
1006  ModEvent le(Space& home, int n);
1008  ModEvent le(Space& home, long long int n);
1009 
1011  ModEvent gq(Space& home, int n);
1013  ModEvent gq(Space& home, long long int n);
1014 
1016  ModEvent gr(Space& home, int n);
1018  ModEvent gr(Space& home, long long int n);
1019 
1021  ModEvent nq(Space& home, int n);
1023  ModEvent nq(Space& home, long long int n);
1024 
1026  ModEvent eq(Space& home, int n);
1028  ModEvent eq(Space& home, long long int n);
1030 
1046  template<class I>
1048  ModEvent narrow_r(Space& home, I& i, bool depends=true);
1050  template<class I>
1051  ModEvent inter_r(Space& home, I& i, bool depends=true);
1053  template<class I>
1054  ModEvent minus_r(Space& home, I& i, bool depends=true);
1056  template<class I>
1057  ModEvent narrow_v(Space& home, I& i, bool depends=true);
1059  template<class I>
1060  ModEvent inter_v(Space& home, I& i, bool depends=true);
1062  template<class I>
1063  ModEvent minus_v(Space& home, I& i, bool depends=true);
1065 
1067 
1068  int min(const Delta& d) const;
1071  int max(const Delta& d) const;
1073  bool any(const Delta& d) const;
1075  };
1076 
1081  template<class Char, class Traits>
1082  std::basic_ostream<Char,Traits>&
1083  operator <<(std::basic_ostream<Char,Traits>& os, const ZeroIntView& x);
1084 
1090  bool same(const ZeroIntView& x, const ZeroIntView& y);
1093 
1094  template<class View> class ViewDiffRanges;
1095 
1106  template<class View>
1107  class CachedView : public DerivedView<View> {
1108  friend class ViewDiffRanges<View>;
1109  protected:
1110  using DerivedView<View>::x;
1116  unsigned int _size;
1117  public:
1119 
1120  CachedView(void);
1123  explicit CachedView(const View& y);
1125 
1127 
1128  int min(void) const;
1131  int max(void) const;
1133  int med(void) const;
1135  int val(void) const;
1136 
1138  unsigned int size(void) const;
1140  unsigned int width(void) const;
1142  unsigned int regret_min(void) const;
1144  unsigned int regret_max(void) const;
1146 
1148 
1149  bool range(void) const;
1151 
1153  bool in(int n) const;
1155  bool in(long long int n) const;
1157 
1159 
1160  ModEvent lq(Space& home, int n);
1163  ModEvent lq(Space& home, long long int n);
1164 
1166  ModEvent le(Space& home, int n);
1168  ModEvent le(Space& home, long long int n);
1169 
1171  ModEvent gq(Space& home, int n);
1173  ModEvent gq(Space& home, long long int n);
1174 
1176  ModEvent gr(Space& home, int n);
1178  ModEvent gr(Space& home, long long int n);
1179 
1181  ModEvent nq(Space& home, int n);
1183  ModEvent nq(Space& home, long long int n);
1184 
1186  ModEvent eq(Space& home, int n);
1188  ModEvent eq(Space& home, long long int n);
1190 
1206  template<class I>
1208  ModEvent narrow_r(Space& home, I& i, bool depends=true);
1210  template<class I>
1211  ModEvent inter_r(Space& home, I& i, bool depends=true);
1213  template<class I>
1214  ModEvent minus_r(Space& home, I& i, bool depends=true);
1216  template<class I>
1217  ModEvent narrow_v(Space& home, I& i, bool depends=true);
1219  template<class I>
1220  ModEvent inter_v(Space& home, I& i, bool depends=true);
1222  template<class I>
1223  ModEvent minus_v(Space& home, I& i, bool depends=true);
1225 
1227 
1228  static ModEventDelta med(ModEvent me);
1231 
1233 
1234  int min(const Delta& d) const;
1237  int max(const Delta& d) const;
1239  bool any(const Delta& d) const;
1241 
1243 
1244  void initCache(Space& home, const IntSet& s);
1247  void cache(Space& home);
1249  bool modified(void) const;
1251 
1253 
1254  void update(Space& home, bool share, CachedView<View>& y);
1257  };
1258 
1263  template<class Char, class Traits, class View>
1264  std::basic_ostream<Char,Traits>&
1265  operator <<(std::basic_ostream<Char,Traits>& os, const CachedView<View>& x);
1266 
1271  template<class View>
1273  bool same(const CachedView<View>& x, const CachedView<View>& y);
1275  template<class View>
1276  bool before(const CachedView<View>& x, const CachedView<View>& y);
1278 
1287  template<class View>
1288  class ViewDiffRanges
1289  : public Iter::Ranges::Diff<Iter::Ranges::RangeList,ViewRanges<View> > {
1291  Super;
1292  protected:
1297  public:
1299 
1300  ViewDiffRanges(void);
1305  void init(const CachedView<View>& x);
1307  };
1308 
1315  class BoolView : public VarImpView<BoolVar> {
1316  protected:
1317  using VarImpView<BoolVar>::x;
1318  public:
1320 
1321  BoolView(void);
1324  BoolView(const BoolVar& y);
1326  BoolView(BoolVarImp* y);
1328 
1330 
1331  static const int BITS = BoolVarImp::BITS;
1340  BoolStatus status(void) const;
1342 
1344 
1345  int min(void) const;
1348  int max(void) const;
1350  int med(void) const;
1352  int val(void) const;
1353 
1355  unsigned int size(void) const;
1357  unsigned int width(void) const;
1359  unsigned int regret_min(void) const;
1361  unsigned int regret_max(void) const;
1363 
1365 
1366  bool range(void) const;
1369  bool in(int n) const;
1371  bool in(long long int n) const;
1373 
1375 
1376  bool zero(void) const;
1379  bool one(void) const;
1381  bool none(void) const;
1383 
1385 
1386  ModEvent one(Space& home);
1389  ModEvent zero(Space& home);
1391  ModEvent one_none(Space& home);
1393  ModEvent zero_none(Space& home);
1395 
1397 
1398  ModEvent lq(Space& home, int n);
1401  ModEvent lq(Space& home, long long int n);
1402 
1404  ModEvent le(Space& home, int n);
1406  ModEvent le(Space& home, long long int n);
1407 
1409  ModEvent gq(Space& home, int n);
1411  ModEvent gq(Space& home, long long int n);
1412 
1414  ModEvent gr(Space& home, int n);
1416  ModEvent gr(Space& home, long long int n);
1417 
1419  ModEvent nq(Space& home, int n);
1421  ModEvent nq(Space& home, long long int n);
1422 
1424  ModEvent eq(Space& home, int n);
1426  ModEvent eq(Space& home, long long int n);
1428 
1444  template<class I>
1446  ModEvent narrow_r(Space& home, I& i, bool depends=true);
1448  template<class I>
1449  ModEvent inter_r(Space& home, I& i, bool depends=true);
1451  template<class I>
1452  ModEvent minus_r(Space& home, I& i, bool depends=true);
1454  template<class I>
1455  ModEvent narrow_v(Space& home, I& i, bool depends=true);
1457  template<class I>
1458  ModEvent inter_v(Space& home, I& i, bool depends=true);
1460  template<class I>
1461  ModEvent minus_v(Space& home, I& i, bool depends=true);
1463 
1465 
1466  int min(const Delta& d) const;
1469  int max(const Delta& d) const;
1471  bool any(const Delta& d) const;
1473  static bool zero(const Delta& d);
1475  static bool one(const Delta& d);
1477 
1479 
1480  static ModEventDelta med(ModEvent me);
1483  };
1484 
1489  template<class Char, class Traits>
1490  std::basic_ostream<Char,Traits>&
1491  operator <<(std::basic_ostream<Char,Traits>& os, const BoolView& x);
1492 
1493 
1494 
1503  class NegBoolView : public DerivedView<BoolView> {
1504  protected:
1506  public:
1508 
1509  NegBoolView(void);
1512  explicit NegBoolView(const BoolView& y);
1514 
1516 
1517  static const int BITS = BoolView::BITS;
1526  BoolStatus status(void) const;
1528 
1530 
1531  bool zero(void) const;
1534  bool one(void) const;
1536  bool none(void) const;
1538 
1540 
1541  ModEvent one(Space& home);
1544  ModEvent zero(Space& home);
1546  ModEvent one_none(Space& home);
1548  ModEvent zero_none(Space& home);
1550 
1552 
1553  int min(void) const;
1556  int max(void) const;
1558  int val(void) const;
1560 
1562 
1563  int min(const Delta& d) const;
1566  int max(const Delta& d) const;
1568  bool any(const Delta& d) const;
1570  static bool zero(const Delta& d);
1572  static bool one(const Delta& d);
1574  };
1575 
1580  template<class Char, class Traits>
1581  std::basic_ostream<Char,Traits>&
1582  operator <<(std::basic_ostream<Char,Traits>& os, const NegBoolView& x);
1583 
1584 }}
1585 
1586 #include <gecode/int/var/int.hpp>
1587 #include <gecode/int/var/bool.hpp>
1588 
1589 #include <gecode/int/view/int.hpp>
1590 
1592 #include <gecode/int/view/zero.hpp>
1593 #include <gecode/int/view/minus.hpp>
1594 #include <gecode/int/view/offset.hpp>
1595 #include <gecode/int/view/scale.hpp>
1596 #include <gecode/int/view/cached.hpp>
1597 
1598 #include <gecode/int/view/bool.hpp>
1599 
1601 
1602 #include <gecode/int/view/print.hpp>
1603 #include <gecode/int/var/print.hpp>
1604 
1605 namespace Gecode { namespace Int {
1606 
1613  enum RelTest {
1615  RT_FALSE = 0,
1616  RT_MAYBE = 1,
1617  RT_TRUE = 2
1618  };
1619 
1621  template<class View> RelTest rtest_eq_bnd(View x, View y);
1623  template<class View> RelTest rtest_eq_dom(View x, View y);
1625  template<class View> RelTest rtest_eq_bnd(View x, int n);
1627  template<class View> RelTest rtest_eq_dom(View x, int n);
1628 
1630  template<class View> RelTest rtest_nq_bnd(View x, View y);
1632  template<class View> RelTest rtest_nq_dom(View x, View y);
1634  template<class View> RelTest rtest_nq_bnd(View x, int n);
1636  template<class View> RelTest rtest_nq_dom(View x, int n);
1637 
1639  template<class View> RelTest rtest_lq(View x, View y);
1641  template<class View> RelTest rtest_lq(View x, int n);
1642 
1644  template<class View> RelTest rtest_le(View x, View y);
1646  template<class View> RelTest rtest_le(View x, int n);
1647 
1649  template<class View> RelTest rtest_gq(View x, View y);
1651  template<class View> RelTest rtest_gq(View x, int n);
1652 
1654  template<class View> RelTest rtest_gr(View x, View y);
1656  template<class View> RelTest rtest_gr(View x, int n);
1658 
1659 
1664  enum BoolTest {
1668  };
1669 
1675  BoolTest bool_test(const BoolView& b0, const BoolView& b1);
1678  BoolTest bool_test(const BoolView& b0, const NegBoolView& b1);
1680  BoolTest bool_test(const NegBoolView& b0, const BoolView& b1);
1682  BoolTest bool_test(const NegBoolView& b0, const NegBoolView& b1);
1684 
1685 }}
1686 
1689 
1690 // STATISTICS: int-var
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: constint.hpp:196
int val(void) const
Return assigned value (only if assigned)
Definition: int.hpp:70
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: minus.hpp:197
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: int.hpp:180
Scale integer view (template)
Definition: view.hpp:671
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: int.hpp:151
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: int.hpp:142
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: offset.hpp:89
int val(void) const
Return assigned value (only if assigned)
Definition: neg-bool.hpp:114
bool none(void) const
Test whether view is not yet assigned.
Definition: bool.hpp:222
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: offset.hpp:148
ViewValues(void)
Default constructor.
Definition: iter.hpp:46
Relation may hold or not.
Definition: view.hpp:1616
int min(void) const
Return minimum of domain.
Definition: cached.hpp:60
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: constint.hpp:75
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: offset.hpp:81
RelTest rtest_gr(View x, int n)
Test whether view x is greater than integer n.
Definition: rel-test.hpp:214
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: zero.hpp:220
int max(void) const
Return maximum of domain.
Definition: bool.hpp:66
static const int BITS
How many bits does the status have.
Definition: view.hpp:1332
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: cached.hpp:167
bool range(void) const
Test whether domain is a range.
Definition: scale.hpp:120
Offset(int off=0)
Constructor with offset off.
Definition: view.hpp:634
Val med(void) const
Return median of domain (greatest element not greater than the median)
Definition: scale.hpp:79
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: offset.hpp:157
BoolStatus status(void) const
Return current domain status.
Definition: neg-bool.hpp:61
OffsetView ViewType
The view type.
Definition: view.hpp:620
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: bool.hpp:79
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: cached.hpp:177
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: bool.hpp:189
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: zero.hpp:170
bool range(void) const
Test whether domain is a range.
Definition: zero.hpp:91
Negated Boolean view.
Definition: view.hpp:1503
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: zero.hpp:175
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: int.hpp:160
RangeList * _lastRange
Last cached range.
Definition: view.hpp:1114
Converter without offsets.
Definition: view.hpp:585
int min(void) const
Return minimum of domain.
Definition: bool.hpp:62
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: zero.hpp:136
unsigned int BoolStatus
Type for status of a Boolean variable.
Definition: var-imp.hpp:479
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: bool.hpp:199
int a
Scale factor.
Definition: view.hpp:675
bool before(const CachedView< View > &x, const CachedView< View > &y)
Definition: cached.hpp:394
IntView(void)
Default constructor.
Definition: int.hpp:45
static const BoolStatus NONE
Status of domain not yet assigned.
Definition: var-imp.hpp:520
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: offset.hpp:93
Val min(void) const
Return minimum of domain.
Definition: scale.hpp:67
bool in(int n) const
Test whether n is contained in domain.
Definition: bool.hpp:105
ViewRanges(void)
Default constructor.
bool operator()(void) const
Test whether iterator is still at a range or done.
Range iterator for range lists
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: bool.hpp:146
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: offset.hpp:166
int ModEvent
Type for modification events.
Definition: core.hpp:146
static const BoolStatus NONE
Status of domain not yet assigned.
Definition: view.hpp:1338
BoolTest
Boolean tests.
Definition: view.hpp:1664
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: minus.hpp:145
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: zero.hpp:118
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: zero.hpp:127
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: constint.hpp:111
ConstIntView(void)
Default constructor.
Definition: constint.hpp:45
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: neg-bool.hpp:132
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: bool.hpp:91
int val(void) const
Return assigned value (only if assigned)
Definition: offset.hpp:76
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: int.hpp:87
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: constint.hpp:147
bool in(int n) const
Test whether n is contained in domain.
Definition: constint.hpp:97
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: constint.hpp:172
ScaleView(void)
Default constructor.
Definition: scale.hpp:48
Value iterator for integer views.
Definition: view.hpp:94
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: int.hpp:175
bool in(int n) const
Test whether n is contained in domain.
Definition: minus.hpp:95
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: int.hpp:185
int min(void) const
Return minimum of domain.
Definition: offset.hpp:64
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: constint.hpp:184
Base-class for constant views.
Definition: view.hpp:45
int scale(void) const
Return scale factor of scale view.
Definition: scale.hpp:62
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: cached.hpp:157
Computation spaces.
Definition: core.hpp:1362
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: constint.hpp:120
void init(const View &x)
Initialize with ranges for view x.
int val(void) const
Return assigned value (only if assigned)
Definition: minus.hpp:64
BoolView(void)
Default constructor.
Definition: bool.hpp:45
UnsVal size(void) const
Return size (cardinality) of domain.
Definition: scale.hpp:91
Base-class for derived views.
Definition: view.hpp:208
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: minus.hpp:73
ZeroIntView(void)
Default constructor.
Definition: zero.hpp:45
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: int.hpp:200
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: minus.hpp:169
Range iterator for integer views.
Definition: view.hpp:54
Boolean variable implementation.
Definition: var-imp.hpp:486
bool in(int n) const
Test whether n is contained in domain.
Definition: zero.hpp:95
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: offset.hpp:193
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: bool.hpp:164
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: minus.hpp:77
Gecode::IntSet d(v, 7)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: scale.hpp:204
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: cached.hpp:70
static const BoolStatus ONE
Status of domain assigned to one.
Definition: var-imp.hpp:518
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
Definition: scale.hpp:97
int max(void) const
Return maximum of domain.
Definition: constint.hpp:58
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: minus.hpp:234
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition: view.hpp:1520
int max(void) const
Return maximum of domain.
Definition: int.hpp:62
Same variable.
Definition: view.hpp:1666
static const BoolStatus NONE
Status of domain not yet assigned.
Definition: view.hpp:1524
bool range(void) const
Test whether domain is a range.
Definition: cached.hpp:106
bool in(int n) const
Test whether n is contained in domain.
Definition: offset.hpp:106
bool same(const CachedView< View > &x, const CachedView< View > &y)
Definition: cached.hpp:389
Gecode::FloatVal c(-8, 8)
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: zero.hpp:60
int min(void) const
Return minimum of domain.
Definition: neg-bool.hpp:106
View ViewType
The view type.
Definition: view.hpp:588
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: minus.hpp:154
RelTest rtest_gq(View x, int n)
Test whether view x is greater or equal than integer n.
Definition: rel-test.hpp:198
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: int.hpp:124
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition: view.hpp:1334
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: bool.hpp:119
bool one(void) const
Test whether view is assigned to be one.
Definition: neg-bool.hpp:69
int min(void) const
Return smallest value of range.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: minus.hpp:190
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: offset.hpp:130
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool in(int n) const
Test whether n is contained in domain.
Definition: int.hpp:101
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: int.hpp:83
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: int.hpp:190
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: offset.hpp:139
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: bool.hpp:204
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: minus.hpp:176
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: zero.hpp:145
int max(void) const
Return maximum of domain.
Definition: offset.hpp:68
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
Definition: bool.hpp:232
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: offset.hpp:199
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: offset.hpp:187
int max(void) const
Return maximum of domain.
Definition: minus.hpp:60
int val(void) const
Return assigned value (only if assigned)
Definition: constint.hpp:66
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: int.hpp:115
Relation does not hold.
Definition: view.hpp:1615
RelTest
Result of testing relation.
Definition: view.hpp:1614
int offset(void) const
Return offset.
Definition: offset.hpp:56
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: int.hpp:75
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: minus.hpp:204
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
Definition: scale.hpp:138
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: offset.hpp:72
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: cached.hpp:200
OffsetView(void)
Default constructor.
Definition: offset.hpp:45
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: cached.hpp:91
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: cached.hpp:81
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: constint.hpp:191
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: bool.hpp:137
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: zero.hpp:69
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: constint.hpp:177
Value iterator from range iterator.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: cached.hpp:127
void update(Space &home, bool share, ConstIntView &y)
Update this view to be a clone of view y.
Definition: constint.hpp:234
RelTest rtest_nq_dom(View x, View y)
Test whether views x and y are different (use full domain information)
Definition: rel-test.hpp:128
int min(void) const
Return minimum of domain.
Definition: int.hpp:58
BoolStatus status(void) const
Return current domain status.
Definition: bool.hpp:58
Base-class for variable implementation views.
Definition: view.hpp:117
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: offset.hpp:85
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: int.hpp:220
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: minus.hpp:81
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: scale.hpp:103
int offset(void) const
Access offset.
Definition: view.hpp:640
void update(const NoOffset &)
Update during cloning.
Definition: view.hpp:605
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: cached.hpp:194
int val(void) const
Return assigned value (only if assigned)
Definition: zero.hpp:64
int max(void) const
Return maximum of domain.
Definition: zero.hpp:56
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: cached.hpp:137
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: bool.hpp:194
int max(void) const
Return maximum of domain.
Definition: cached.hpp:65
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: constint.hpp:129
int max(void) const
Return maximum of domain.
Definition: neg-bool.hpp:110
CachedView(void)
Default constructor.
Definition: cached.hpp:46
Integer sets.
Definition: int.hh:171
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
Definition: bool-test.hpp:45
Offset integer view.
Definition: view.hpp:422
void update(const Offset &o)
Update during cloning.
Definition: view.hpp:637
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: zero.hpp:182
void init(const CachedView< View > &x)
Initialize with ranges for view x.
Definition: cached.hpp:377
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition: bool.hpp:155
OffsetView operator()(IntView &x)
Return OffsetRefView for x.
Definition: view.hpp:643
static const BoolStatus ONE
Status of domain assigned to one.
Definition: view.hpp:1522
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
Definition: scale.hpp:145
RelTest rtest_eq_dom(View x, View y)
Test whether views x and y are equal (use full domain information)
Definition: rel-test.hpp:68
Same variable but complement.
Definition: view.hpp:1667
ViewDiffRanges(void)
Default constructor.
Definition: cached.hpp:366
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: offset.hpp:211
Converter with fixed offset.
Definition: view.hpp:617
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: constint.hpp:156
void update(Space &home, bool share, CachedView< View > &y)
Update this view to be a clone of view y.
Definition: cached.hpp:269
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
Zero integer view.
Definition: view.hpp:959
Boolean integer variables.
Definition: int.hh:491
bool none(void) const
Test whether view is not yet assigned.
Definition: neg-bool.hpp:73
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: int.hpp:195
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition: var-imp.hpp:516
NegBoolView(void)
Default constructor.
Definition: neg-bool.hpp:50
Val max(void) const
Return maximum of domain.
Definition: scale.hpp:73
RelTest rtest_nq_bnd(View x, View y)
Test whether views x and y are different (use bounds information)
Definition: rel-test.hpp:107
Constant integer view.
Definition: view.hpp:804
int min(void) const
Return minimum of domain.
Definition: constint.hpp:54
int c
The offset.
Definition: view.hpp:622
bool one(void) const
Test whether view is assigned to be one.
Definition: bool.hpp:218
bool range(void) const
Test whether domain is a range.
Definition: bool.hpp:101
Integer view for integer variables.
Definition: view.hpp:129
Integer variable implementation.
Definition: var-imp.hpp:91
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition: zero.hpp:154
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: constint.hpp:203
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition: bool.hpp:184
RelTest rtest_le(View x, int n)
Test whether view x is less than integer n.
Definition: rel-test.hpp:182
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
Generic domain change information to be supplied to advisors.
Definition: core.hpp:275
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: constint.hpp:62
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: constint.hpp:138
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: offset.hpp:205
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: constint.hpp:79
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: offset.hpp:241
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: cached.hpp:86
ScaleView< int, unsigned int > IntScaleView
Integer-precision integer scale view.
Definition: view.hpp:759
unsigned int _size
Size of cached domain.
Definition: view.hpp:1116
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: bool.hpp:83
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: offset.hpp:121
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: cached.hpp:206
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: bool.hpp:70
int val(void) const
Return assigned value (only if assigned)
Definition: cached.hpp:75
Minus integer view.
Definition: view.hpp:276
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: zero.hpp:77
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: int.hpp:79
Integer variables.
Definition: int.hh:350
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
#define forceinline
Definition: config.hpp:132
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition: minus.hpp:136
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
Definition: scale.hpp:158
int val(void) const
Return assigned value (only if assigned)
Definition: bool.hpp:74
Cached integer view.
Definition: view.hpp:1107
View & operator()(View &x)
Pass through x.
Definition: view.hpp:599
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition: minus.hpp:183
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: int.hpp:133
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: int.hpp:66
void operator++(void)
Move iterator to next range (if possible)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: bool.hpp:87
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: offset.hpp:181
bool modified(void) const
Check whether cache differs from current domain.
Definition: cached.hpp:324
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: cached.hpp:212
bool range(void) const
Test whether domain is a range.
Definition: int.hpp:97
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: cached.hpp:257
int med(void) const
Return median of domain.
Definition: minus.hpp:287
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: zero.hpp:81
RelTest rtest_eq_bnd(View x, View y)
Test whether views x and y are equal (use bounds information)
Definition: rel-test.hpp:47
int min(void) const
Return minimum of domain.
Definition: zero.hpp:52
void update(Space &home, bool share, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
Definition: scale.hpp:216
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: zero.hpp:109
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: zero.hpp:194
No sharing.
Definition: view.hpp:1665
bool range(void) const
Test whether domain is a range.
Definition: minus.hpp:91
void update(Space &home, bool share, OffsetView &y)
Update this view to be a clone of view y.
Definition: offset.hpp:252
Lists of ranges (intervals)
Definition: range-list.hpp:53
static const BoolStatus ONE
Status of domain assigned to one.
Definition: view.hpp:1336
Val val(void) const
Return assigned value (only if assigned)
Definition: scale.hpp:85
int min(void) const
Return minimum of domain.
Definition: minus.hpp:56
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: minus.hpp:118
bool in(int n) const
Test whether n is contained in domain.
Definition: cached.hpp:111
int max(void) const
Return largest value of range.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: constint.hpp:223
bool zero(void) const
Test whether view is assigned to be zero.
Definition: neg-bool.hpp:65
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
Definition: neg-bool.hpp:83
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
Definition: bool.hpp:236
Range iterator for computing set difference.
Definition: ranges-diff.hpp:47
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition: minus.hpp:109
bool zero(void) const
Test whether view is assigned to be zero.
Definition: bool.hpp:214
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: zero.hpp:201
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition: bool.hpp:128
void init(const View &x)
Initialize with values x.
Definition: iter.hpp:57
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: constint.hpp:71
ScaleView< long long int, unsigned long long int > LLongScaleView
Long long-precision integer scale view.
Definition: view.hpp:765
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: cached.hpp:96
void cache(Space &home)
Update cache to current domain.
Definition: cached.hpp:307
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
Definition: scale.hpp:165
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
Definition: cached.hpp:295
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: minus.hpp:127
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition: cached.hpp:147
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: minus.hpp:69
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: zero.hpp:73
static const int BITS
How many bits does the status have.
Definition: var-imp.hpp:514
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition: cached.hpp:224
bool in(Val n) const
Test whether n is contained in domain.
Definition: scale.hpp:125
bool range(void) const
Test whether domain is a range.
Definition: offset.hpp:102
bool range(void) const
Test whether domain is a range.
Definition: constint.hpp:93
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
Definition: neg-bool.hpp:87
Relation does hold.
Definition: view.hpp:1617
static const int BITS
How many bits does the status have.
Definition: view.hpp:1518
Iter::Ranges::RangeList cr
Cached domain iterator.
Definition: view.hpp:1294
int offset(void) const
Access offset.
Definition: view.hpp:609
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition: cached.hpp:218
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition: bool.hpp:263
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: scale.hpp:109
Range iterator for cached integer views
Definition: view.hpp:1094
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
Definition: scale.hpp:171
RangeList * _firstRange
First cached range.
Definition: view.hpp:1112
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
Definition: scale.hpp:152
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: constint.hpp:83
ViewRanges< View > dr
Current domain iterator.
Definition: view.hpp:1296
MinusView(void)
Default constructor.
Definition: minus.hpp:45
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition: zero.hpp:189
Boolean view for Boolean variables.
Definition: view.hpp:1315
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition: bool.hpp:179
RelTest rtest_lq(View x, int n)
Test whether view x is less or equal than integer n.
Definition: rel-test.hpp:166