本文整理汇总了C++中Space::ES_NOFIX_DISPOSE方法的典型用法代码示例。如果您正苦于以下问题:C++ Space::ES_NOFIX_DISPOSE方法的具体用法?C++ Space::ES_NOFIX_DISPOSE怎么用?C++ Space::ES_NOFIX_DISPOSE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Space
的用法示例。
在下文中一共展示了Space::ES_NOFIX_DISPOSE方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例3: assert
ExecStatus
ChannelBool<View>::advise(Space& home, Advisor& _a, const Delta& _d) {
IndexAdvisor& a = static_cast<IndexAdvisor&>(_a);
const SetDelta& d = static_cast<const SetDelta&>(_d);
ModEvent me = View::modevent(d);
int index = a.index();
if ( (running && index == -1 && me != ME_SET_VAL)
|| (index == -1 && me == ME_SET_CARD) ) {
return ES_OK;
}
if (index >= 0) {
if (x[index].zero()) {
SetDelta dummy;
zeros.include(home, index, index, dummy);
} else {
assert(x[index].one());
SetDelta dummy;
ones.include(home, index, index, dummy);
}
return home.ES_NOFIX_DISPOSE( co, a);
}
if ((a.index() == -1) && Rel::testSetEventLB(me)) {
if (d.glbAny()) {
new (&delta)
SetDelta(2,0, delta.lubMin(), delta.lubMax());
} else {
if (delta.glbMin() == 1 && delta.glbMax() == 0) {
new (&delta)
SetDelta(d.glbMin(), d.glbMax(),
delta.lubMin(), delta.lubMax());
} else {
if (delta.glbMin() != 2 || delta.glbMax() != 0) {
if ((delta.glbMin() <= d.glbMin() && delta.glbMax() >= d.glbMin())
||
(delta.glbMin() <= d.glbMax() && delta.glbMax() >= d.glbMax())
) {
new (&delta)
SetDelta(std::min(delta.glbMin(), d.glbMin()),
std::max(delta.glbMax(), d.glbMax()),
delta.lubMin(), delta.lubMax());
} else {
new (&delta)
SetDelta(2, 0, delta.lubMin(), delta.lubMax());
}
}
}
}
}
if ((a.index() == -1) && Rel::testSetEventUB(me)) {
if (d.lubAny()) {
new (&delta)
SetDelta(delta.glbMin(), delta.glbMax(), 2,0);
} else {
if (delta.lubMin() == 1 && delta.lubMax() == 0) {
new (&delta)
SetDelta(delta.glbMin(), delta.glbMax(),
d.lubMin(), d.lubMax());
} else {
if (delta.lubMin() != 2 || delta.lubMax() != 0) {
if ((delta.lubMin() <= d.lubMin() && delta.lubMax() >= d.lubMin())
||
(delta.lubMin() <= d.lubMax() && delta.lubMax() >= d.lubMax())
) {
new (&delta)
SetDelta(delta.lubMin(), delta.lubMax(),
std::min(delta.lubMin(), d.lubMin()),
std::max(delta.lubMax(), d.lubMax())
);
} else {
new (&delta)
SetDelta(delta.glbMin(), delta.glbMax(), 2, 0);
}
}
}
}
}
if (y.assigned())
return home.ES_NOFIX_DISPOSE( co, a);
else
return ES_NOFIX;
}