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

Method cache

gecode/int/view/cached.hpp:318–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317 template<class View>
318 void
319 CachedView<View>::cache(Space& home) {
320 _firstRange->dispose(home,_lastRange);
321 ViewRanges<View> xr(x);
322 _firstRange = new (home) RangeList(xr.min(),xr.max(),nullptr);
323 ++xr;
324 RangeList* cur = _firstRange;
325 for (; xr(); ++xr) {
326 RangeList* next = new (home) RangeList(xr.min(),xr.max(),nullptr);
327 cur->next(next);
328 cur = next;
329 }
330 _lastRange = cur;
331 _size = x.size();
332 }
333
334 template<class View>
335 forceinline bool

Callers 1

propagateMethod · 0.80

Calls 5

disposeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
nextMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected