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

Method unwind

gecode/search/seq/path.hpp:195–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194 template<class Tracer>
195 forceinline void
196 Path<Tracer>::unwind(int l, Tracer& t) {
197 assert((ds[l].space() == nullptr) || ds[l].space()->failed());
198 int n = ds.entries();
199 if (t) {
200 for (int i=l; i<n; i++) {
201 Path<Tracer>::Edge& top = ds.top();
202 unsigned int fa = (i != l) ? top.alt() + 1 : top.alt();
203 for (unsigned int a = fa; a < top.choice()->alternatives(); a++) {
204 SearchTracer::EdgeInfo ei(t.wid(),top.nid(),a);
205 t.skip(ei);
206 }
207 ds.pop().dispose();
208 }
209 } else {
210 for (int i=l; i<n; i++)
211 ds.pop().dispose();
212 }
213 assert(ds.entries() == l);
214 }
215
216 template<class Tracer>
217 inline void

Callers

nothing calls this directly

Calls 11

alternativesMethod · 0.80
spaceMethod · 0.45
failedMethod · 0.45
entriesMethod · 0.45
altMethod · 0.45
choiceMethod · 0.45
widMethod · 0.45
nidMethod · 0.45
skipMethod · 0.45
disposeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected