MCPcopy Create free account
hub / github.com/Gecode/gecode / BndSet

Method BndSet

gecode/set/var-imp/integerset.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace Gecode { namespace Set {
39
40 BndSet::BndSet(Space& home, const IntSet& is) {
41 if (is.ranges()==0) {
42 fst(nullptr); lst(nullptr); _size = 0;
43 } else {
44 int n = is.ranges();
45 RangeList* r = home.alloc<RangeList>(n);
46 fst(r); lst(r+n-1);
47 unsigned int s = 0;
48 for (int i = n; i--; ) {
49 s += is.width(i);
50 r[i].min(is.min(i)); r[i].max(is.max(i));
51 r[i].next(&r[i+1]);
52 }
53 r[n-1].next(nullptr);
54 _size = s;
55 }
56 assert(isConsistent());
57 }
58
59 bool
60 GLBndSet::include_full(Space& home, int mi, int ma, SetDelta& d) {

Callers

nothing calls this directly

Calls 5

rangesMethod · 0.45
widthMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected