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

Method processBranchesTrim

Parallel/NetworkSequenceCollection.cpp:917–942  ·  view source on GitHub ↗

Process current branches, removing those that are finished returns true if the branch list has branches remaining

Source from the content-addressed store, hash-verified

915// returns true if the branch list has branches remaining
916//
917size_t NetworkSequenceCollection::processBranchesTrim()
918{
919 size_t numBranchesRemoved = 0;
920 vector<BranchGroupMap::iterator> removeBranches;
921 // Check if any of the current branches have gone inactive
922 for (BranchGroupMap::iterator iter = m_activeBranchGroups.begin();
923 iter != m_activeBranchGroups.end(); iter++) {
924 if(!iter->second.isActive())
925 {
926 assert(iter->second.size() == 1);
927 if (AssemblyAlgorithms::processTerminatedBranchTrim(
928 this, iter->second[0]))
929 numBranchesRemoved++;
930
931 // Mark the group for removal
932 removeBranches.push_back(iter);
933 }
934 }
935
936 // Remove all the finished branches
937 for (vector<BranchGroupMap::iterator>::iterator rmIter
938 = removeBranches.begin();
939 rmIter != removeBranches.end(); rmIter++)
940 m_activeBranchGroups.erase(*rmIter);
941 return numBranchesRemoved;
942}
943
944/** Discover bubbles to pop. */
945size_t NetworkSequenceCollection::

Callers

nothing calls this directly

Calls 7

eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
isActiveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected