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

Function removeIslands_if

Graph/ContigGraphAlgorithms.h:328–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326 */
327template<typename Graph, typename OutputIt, typename Pred>
328OutputIt
329removeIslands_if(Graph& g, OutputIt result, Pred p)
330{
331 typedef typename graph_traits<Graph>::vertex_iterator Uit;
332 typedef typename graph_traits<Graph>::vertex_descriptor V;
333
334 /** Identify and remove Islands. */
335 std::pair<Uit, Uit> urange = vertices(g);
336 for (Uit uit = urange.first; uit != urange.second; ++uit) {
337 V u = *uit;
338 if (get(vertex_removed, g, u))
339 continue;
340 if (p(u) && in_degree(u, g) == 0 && out_degree(u, g) == 0) {
341 *result++ = get(vertex_contig_index, g, u);
342 clear_vertex(u, g);
343 remove_vertex(u, g);
344 }
345 }
346 return result;
347}
348
349/** Add missing complementary edges. */
350template<typename DG>

Callers 1

mainFunction · 0.85

Calls 6

verticesFunction · 0.70
getFunction · 0.70
in_degreeFunction · 0.70
out_degreeFunction · 0.70
clear_vertexFunction · 0.70
remove_vertexFunction · 0.70

Tested by

no test coverage detected