本文整理汇总了C++中SListPure::conc方法的典型用法代码示例。如果您正苦于以下问题:C++ SListPure::conc方法的具体用法?C++ SListPure::conc怎么用?C++ SListPure::conc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SListPure
的用法示例。
在下文中一共展示了SListPure::conc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplacePartialRoot
void EmbedPQTree::ReplacePartialRoot(
SListPure<PlanarLeafKey<indInfo*>*> &leafKeys,
SListPure<PQBasicKey<edge,indInfo*,bool>*> &frontier,
node v)
{
m_pertinentRoot->childCount(m_pertinentRoot->childCount() + 1 -
fullChildren(m_pertinentRoot)->size());
PQNode<edge,indInfo*,bool> *predNode = 0; // dummy
PQNode<edge,indInfo*,bool> *beginSequence = 0; // marks begin consecuitve seqeunce
PQNode<edge,indInfo*,bool> *endSequence = 0; // marks end consecutive sequence
PQNode<edge,indInfo*,bool> *beginInd = 0; // initially, marks direct sibling indicator
// next to beginSequence not contained
// in consectuive sequence
// Get beginning and end of sequence.
while (fullChildren(m_pertinentRoot)->size())
{
PQNode<edge,indInfo*,bool> *currentNode = fullChildren(m_pertinentRoot)->popFrontRet();
if (!clientSibLeft(currentNode) ||
clientSibLeft(currentNode)->status() == EMPTY)
{
if (!beginSequence)
{
beginSequence = currentNode;
predNode = clientSibLeft(currentNode);
beginInd =PQTree<edge,indInfo*,bool>::clientSibLeft(currentNode);
}
else
endSequence = currentNode;
}
else if (!clientSibRight(currentNode) ||
clientSibRight(currentNode)->status() == EMPTY )
{
if (!beginSequence)
{
beginSequence = currentNode;
predNode = clientSibRight(currentNode);
beginInd =PQTree<edge,indInfo*,bool>::clientSibRight(currentNode);
}
else
endSequence = currentNode;
}
}
SListPure<PQBasicKey<edge,indInfo*,bool>*> partialFrontier;
// Now scan the sequence of full nodes. Remove all of them but the last.
// Call ReplaceFullRoot on the last one.
// For every full node get its frontier. Scan intermediate indicators.
PQNode<edge,indInfo*,bool> *currentNode = beginSequence;
while (currentNode != endSequence)
{
PQNode<edge,indInfo*,bool>* nextNode =
clientNextSib(currentNode,predNode);
front(currentNode,partialFrontier);
frontier.conc(partialFrontier);
PQNode<edge,indInfo*,bool>* currentInd = PQTree<edge,indInfo*,bool>::
clientNextSib(currentNode,beginInd);
// Scan for intermediate direction indicators.
while (currentInd != nextNode)
{
PQNode<edge,indInfo*,bool> *nextInd = PQTree<edge,indInfo*,bool>::
clientNextSib(currentInd,currentNode);
if (currentNode == currentInd->getSib(RIGHT)) //Direction changed
currentInd->getNodeInfo()->userStructInfo()->changeDir = true;
frontier.pushBack((PQBasicKey<edge,indInfo*,bool>*)
currentInd->getNodeInfo());
removeChildFromSiblings(currentInd);
m_pertinentNodes->pushBack(currentInd);
currentInd = nextInd;
}
removeChildFromSiblings(currentNode);
currentNode = nextNode;
}
currentNode->parent(m_pertinentRoot);
m_pertinentRoot = currentNode;
ReplaceFullRoot(leafKeys,partialFrontier,v,true,beginInd);
frontier.conc(partialFrontier);
}