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

Method advise

gecode/int/sequence/int.hpp:70–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69 template<class View,class Val>
70 ExecStatus
71 Sequence<View,Val>::advise(Space& home, Advisor& _a, const Delta& d) {
72 SupportAdvisor<View>& a = static_cast<SupportAdvisor<View>&>(_a);
73 ExecStatus status = vvsamax.advise(home,x,s,q,a.i,d);
74 if ( ES_NOFIX == vvsamin.advise(home,x,s,q,a.i,d) ) {
75 status = ES_NOFIX;
76 }
77
78 if (!undecided(x[a.i],s)) {
79 if (!x[a.i].assigned())
80 x[a.i].cancel(home,a);
81
82 if ( ES_NOFIX == status ) {
83 return home.ES_NOFIX_DISPOSE(ac,a);
84 } else {
85 return home.ES_FIX_DISPOSE(ac,a);
86 }
87 }
88
89 if ((status == ES_FAILED) && disabled()) {
90 tofail = true;
91 return ES_FIX;
92 }
93
94 return status;
95 }
96
97 template<class View, class Val>
98 forceinline size_t

Callers

nothing calls this directly

Calls 5

undecidedFunction · 0.85
ES_NOFIX_DISPOSEMethod · 0.80
ES_FIX_DISPOSEMethod · 0.80
assignedMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected