本文整理汇总了C++中Space::ES_FIX_DISPOSE方法的典型用法代码示例。如果您正苦于以下问题:C++ Space::ES_FIX_DISPOSE方法的具体用法?C++ Space::ES_FIX_DISPOSE怎么用?C++ Space::ES_FIX_DISPOSE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Space
的用法示例。
在下文中一共展示了Space::ES_FIX_DISPOSE方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ExecStatus
Sequence<View,Val>::advise(Space& home, Advisor& _a, const Delta& d) {
SupportAdvisor<View>& a = static_cast<SupportAdvisor<View>&>(_a);
ExecStatus status = vvsamax.advise(home,x,s,q,a.i,d);
if ( ES_NOFIX == vvsamin.advise(home,x,s,q,a.i,d) ) {
status = ES_NOFIX;
}
if (!undecided(x[a.i],s)) {
if (!x[a.i].assigned())
x[a.i].cancel(home,a);
if ( ES_NOFIX == status ) {
return home.ES_NOFIX_DISPOSE(ac,a);
} else {
return home.ES_FIX_DISPOSE(ac,a);
}
}
return status;
}
示例2: vv
ExecStatus
Incremental<View>::advise(Space& home, Advisor& _a, const Delta& d) {
SupportAdvisor& a = static_cast<SupportAdvisor&>(_a);
ModEvent me = View::modevent(d);
bool scheduled = !w_support.empty() || !w_remove.empty();
if (x[a.i].any(d)) {
ViewValues<View> vv(x[a.i]);
for (int n = ts()->min; n <= ts()->max; n++) {
if (vv() && (n == vv.val())) {
++vv;
continue;
}
while (SupportEntry* s = support(a.i,n))
remove_support(home, s->t, a.i, n);
}
} else {
for (int n = x[a.i].min(d); n <= x[a.i].max(d); n++)
while (SupportEntry* s = support(a.i,n))
remove_support(home, s->t, a.i, n);
}
if (me == ME_INT_VAL) {
--unassigned;
// nothing to do or already scheduled
// propagator is not subsumed since unassigned!=0
if (((w_support.empty() && w_remove.empty()) || scheduled) &&
(unassigned != 0))
return home.ES_FIX_DISPOSE(ac,a);
else
return home.ES_NOFIX_DISPOSE(ac,a);
} else if ((w_support.empty() && w_remove.empty()) || scheduled) {
// nothing to do or already scheduled
return ES_FIX;
}
return ES_NOFIX;
}