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

Method update

gecode/int/val-set.hpp:99–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 }
98
99 forceinline void
100 ValSet::update(Space& home, ValSet& vs) {
101 if (vs.n > 0) {
102 n = vs.n;
103 // Count number of ranges
104 int m = 0;
105 for (RangeList* c = vs.fst; c != nullptr; c = c->next())
106 m++;
107 fst = home.alloc<RangeList>(m);
108 lst = fst + (m-1);
109 int i=0;
110 for (RangeList* c = vs.fst; c != nullptr; c = c->next()) {
111 fst[i].min(c->min()); fst[i].max(c->max());
112 fst[i].next(fst+i+1);
113 i++;
114 }
115 lst->next(nullptr);
116 }
117 }
118
119 forceinline void
120 ValSet::flush(void) {

Callers

nothing calls this directly

Calls 3

nextMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected