本文整理汇总了C++中UpdateInfo::focusDirection方法的典型用法代码示例。如果您正苦于以下问题:C++ UpdateInfo::focusDirection方法的具体用法?C++ UpdateInfo::focusDirection怎么用?C++ UpdateInfo::focusDirection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UpdateInfo
的用法示例。
在下文中一共展示了UpdateInfo::focusDirection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: debugCheckWitness
bool FCSimplexDecisionProcedure::debugCheckWitness(const UpdateInfo& inf, WitnessImprovement w, bool useBlands){
if(inf.getWitness(useBlands) == w){
switch(w){
case ConflictFound: return inf.foundConflict();
case ErrorDropped: return inf.errorsChange() < 0;
case FocusImproved: return inf.focusDirection() > 0;
case FocusShrank: return false; // This is not a valid output
case Degenerate: return false; // This is not a valid output
case BlandsDegenerate: return useBlands;
case HeuristicDegenerate: return !useBlands;
case AntiProductive: return false;
}
}
return false;
}
示例2: dualLikeImproveError
WitnessImprovement FCSimplexDecisionProcedure::dualLikeImproveError(ArithVar errorVar){
Assert(d_sgnDisagreements.empty());
Assert(d_focusSize > 1);
UpdateInfo selected = selectUpdateForDualLike(errorVar);
if(selected.uninitialized()){
// we found no proposals
// If this is empty, there must be an error on this variable!
// this should not be possible. It Should have been caught as a signal earlier
WitnessImprovement dropped = focusUsingSignDisagreements(errorVar);
Assert(d_sgnDisagreements.empty());
return dropped;
}else{
d_sgnDisagreements.clear();
}
Assert(d_sgnDisagreements.empty());
Assert(!selected.uninitialized());
if(selected.focusDirection() == 0 &&
d_prevWitnessImprovement == HeuristicDegenerate &&
d_witnessImprovementInARow >= s_focusThreshold){
Debug("focusDownToJust") << "focusDownToJust " << errorVar << endl;
return focusDownToJust(errorVar);
}else{
WitnessImprovement w = selected.getWitness(false);
Assert(debugCheckWitness(selected, w, false));
updateAndSignal(selected, w);
logPivot(w);
return w;
}
}