本文整理汇总了C++中Iter::sign方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::sign方法的具体用法?C++ Iter::sign怎么用?C++ Iter::sign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iter
的用法示例。
在下文中一共展示了Iter::sign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rLog
void
Vineyard<I,It,E>::
start_vine(Iter i)
{
rLog(rlVineyard, "Starting new vine");
AssertMsg(i->sign(), "Can only start vines for positive simplices");
Dimension dim = evaluator->dimension(i);
vines_vector[dim]->push_back(Vine());
i->set_vine(&vines_vector[dim]->back());
i->pair->set_vine(i->vine());
}
示例2: k
void
Vineyard<I,It,E>::
record_knee(Iter i)
{
rLog(rlVineyard, "Entered record_knee()");
AssertMsg(evaluator != 0, "Cannot record knee with a null evaluator");
AssertMsg(i->vine() != 0, "Cannot add a knee to a null vine");
AssertMsg(i->sign(), "record_knee() must be called on a positive simplex");
if (i->unpaired())
i->vine()->add((*evaluator)(i), Infinity, evaluator->time());
else
{
rLog(rlVineyard, "Creating knee");
Knee k((*evaluator)(i), (*evaluator)((i->pair)), evaluator->time());
rLog(rlVineyard, "Knee created: %s", tostring(k).c_str());
rLog(rlVineyard, "Vine: %s", tostring(*(i->vine())).c_str());
if (!k.is_diagonal() || i->vine()->empty()) // non-diagonal k, or empty vine
{
rLog(rlVineyard, "Extending a vine");
i->vine()->add(k);
}
else if (i->vine()->back().is_diagonal()) // last knee is diagonal
{
AssertMsg(i->vine()->size() == 1, "Only first knee may be diagonal for a live vine");
rLog(rlVineyard, "Overwriting first diagonal knee");
i->vine()->back() = k;
} else // finish this vine
{
rLog(rlVineyard, "Finishing a vine");
i->vine()->add(k);
start_vine(i);
i->vine()->add(k);
}
}
rLog(rlVineyard, "Leaving record_knee()");
}