本文整理汇总了C++中sp::Interaction::getLambdaRef方法的典型用法代码示例。如果您正苦于以下问题:C++ Interaction::getLambdaRef方法的具体用法?C++ Interaction::getLambdaRef怎么用?C++ Interaction::getLambdaRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sp::Interaction
的用法示例。
在下文中一共展示了Interaction::getLambdaRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateIndexSetsWithDoubleCondition
void EventDriven::updateIndexSetsWithDoubleCondition()
{
assert(_nsds);
assert(_nsds->topology());
// for all Interactions in indexSet[i-1], compute y[i-1] and
// update the indexSet[i]
SP::Topology topo = _nsds->topology();
SP::InteractionsGraph indexSet2 = topo->indexSet(2);
InteractionsGraph::VIterator ui, uiend, vnext;
std11::tie(ui, uiend) = indexSet2->vertices();
for (vnext = ui; ui != uiend; ui = vnext)
{
++vnext;
SP::Interaction inter = indexSet2->bundle(*ui);
double gamma = inter->getYRef(2);
double F = inter->getLambdaRef(2);
if (fabs(F) < _TOL_ED)
indexSet2->remove_vertex(inter);
else if ((gamma < -_TOL_ED) || (F < -_TOL_ED))
RuntimeException::selfThrow("EventDriven::updateIndexSetsWithDoubleCondition(), output[2] and lambda[2] for Interactionof indexSet[2] must be higher or equal to zero.");
else if (((fabs(gamma) > _TOL_ED) && (fabs(F) > _TOL_ED)))
RuntimeException::selfThrow("EventDriven::updateIndexSetsWithDoubleCondition(), something is wrong for the LCP resolution.");
}
}