本文整理汇总了C++中HashNode::InEdges方法的典型用法代码示例。如果您正苦于以下问题:C++ HashNode::InEdges方法的具体用法?C++ HashNode::InEdges怎么用?C++ HashNode::InEdges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HashNode
的用法示例。
在下文中一共展示了HashNode::InEdges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RefreshEdges
void HashGraph::RefreshEdges()
{
num_edges = 0;
#pragma omp parallel for
for (int64 i = 0; i < (int64)table_size; ++i)
{
for (HashNode *node = table[i]; node; node = node->next)
{
KmerNodeAdapter curr(node);
for (int strand = 0; strand < 2; ++strand)
{
Kmer kmer;
curr.GetKmer(kmer);
unsigned edges = curr.OutEdges();
for (int x = 0; x < 4; ++x)
{
if (edges & (1 << x))
{
Kmer next = kmer;
next.AddRight(x);
if (GetNode(next) == NULL)
curr.RemoveOutEdge(x);
else
{
#pragma omp atomic
++num_edges;
}
}
}
curr.ReverseComplement();
}
if (node->kmer.IsPalindrome())
{
unsigned edges = node->InEdges() | node->OutEdges();
node->SetInEdges(edges);
node->SetOutEdges(edges);
}
}
}
num_edges >>= 1;
}