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

Method update

gecode/set/view/const.hpp:216–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 }
215
216 forceinline void
217 ConstSetView::update(Space& home, ConstSetView& p) {
218 ConstView<SetView>::update(home,p);
219 // dispose old ranges
220 if (size > 0)
221 home.free<int>(ranges, 2);
222
223 domSize = p.domSize;
224 size = p.size;
225 if (size == 0) {
226 ranges = nullptr;
227 } else {
228 // copy ranges from p
229 ranges = home.alloc<int>(2*size);
230 for (int i=size; i--; ) {
231 ranges[2*i] = p.ranges[2*i];
232 ranges[2*i+1] = p.ranges[2*i+1];
233 }
234 }
235 }
236
237
238 /*

Callers 15

inter.hppFile · 0.45
propagateMethod · 0.45
PropagatorFunction · 0.45
propagateMethod · 0.45
PropagatorFunction · 0.45
unionConst.hppFile · 0.45
propagateMethod · 0.45
partition.hppFile · 0.45
inter.hppFile · 0.45
propagateMethod · 0.45
union.hppFile · 0.45

Calls 1

updateFunction · 0.85

Tested by

no test coverage detected