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

Method advise

gecode/set/precede/single.hpp:196–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194
195 template<class View>
196 ExecStatus
197 Single<View>::advise(Space& home, Advisor& a0, const Delta&) {
198 Index& a(static_cast<Index&>(a0));
199 int i = a.i;
200 // Check for gamma
201 if ((beta <= gamma) && (i < gamma) &&
202 x[i].notContains(s) && x[i].contains(t))
203 gamma = i;
204 if (x[i].assigned()) {
205 a.dispose(home,c);
206 if (c.empty())
207 return ES_NOFIX;
208 } else if ((i < alpha) || (i > gamma)) {
209 x[i].cancel(home,a);
210 a.dispose(home,c);
211 return (c.empty()) ? ES_NOFIX : ES_FIX;
212 }
213 if (beta > gamma)
214 return ES_NOFIX;
215 if ((alpha == i) || (beta == i))
216 return ES_NOFIX;
217 return ES_FIX;
218 }
219
220 template<class View>
221 ExecStatus

Callers

nothing calls this directly

Calls 6

notContainsMethod · 0.45
containsMethod · 0.45
assignedMethod · 0.45
disposeMethod · 0.45
emptyMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected