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

Method update

gecode/int/view/cached.hpp:280–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278 */
279 template<class View>
280 void
281 CachedView<View>::update(Space& home, CachedView<View>& y) {
282 DerivedView<View>::update(home,y);
283 if (y._firstRange) {
284 _firstRange = new (home) RangeList(y._firstRange->min(),
285 y._firstRange->max(),nullptr);
286 RangeList* cur = _firstRange;
287
288 for (RangeList* y_cur = y._firstRange->next(); y_cur != nullptr;
289 y_cur = y_cur->next()) {
290 RangeList* next =
291 new (home) RangeList(y_cur->min(),y_cur->max(),nullptr);
292 cur->next(next);
293 cur = next;
294 }
295 _lastRange = cur;
296 _size = y._size;
297 }
298 }
299
300
301 /*

Callers

nothing calls this directly

Calls 4

updateFunction · 0.85
minMethod · 0.45
maxMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected