MCPcopy Create free account
hub / github.com/BirolLab/abyss / processBranchesDiscoverBubbles

Method processBranchesDiscoverBubbles

Parallel/NetworkSequenceCollection.cpp:1047–1082  ·  view source on GitHub ↗

Process groups that are finished searching for bubbles

Source from the content-addressed store, hash-verified

1045// Process groups that are finished searching for bubbles
1046//
1047bool NetworkSequenceCollection::processBranchesDiscoverBubbles()
1048{
1049 bool active = false;
1050 // Check if any of the current branches have gone inactive
1051 BranchGroupMap::iterator iter = m_activeBranchGroups.begin();
1052 while (iter != m_activeBranchGroups.end()) {
1053 // All branches have been extended one sequence. Check the
1054 // stop conditions. updateStatus() is called in
1055 // processSequenceExtensionPop().
1056 BranchGroupStatus status = iter->second.isNoExt() ? BGS_NOEXT
1057 : iter->second.getStatus();
1058 bool finished = false;
1059 switch (status) {
1060 case BGS_TOOLONG:
1061 case BGS_TOOMANYBRANCHES:
1062 case BGS_NOEXT:
1063 finished = true;
1064 break;
1065 case BGS_JOINED:
1066 m_bubbles.insert(*iter);
1067 finished = true;
1068 break;
1069 case BGS_ACTIVE:
1070 active = true;
1071 break;
1072 default:
1073 assert(false);
1074 }
1075 if (finished) {
1076 m_finishedGroups.insert(iter->first);
1077 m_activeBranchGroups.erase(iter++);
1078 } else
1079 iter++;
1080 }
1081 return active;
1082}
1083
1084/** Discover bubbles to pop. */
1085size_t NetworkSequenceCollection::controlDiscoverBubbles()

Callers

nothing calls this directly

Calls 6

isNoExtMethod · 0.80
getStatusMethod · 0.80
eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected