Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/graph/algorithm/connected_components.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "graph/views/incidence.hpp"
#include "graph/views/vertexlist.hpp"
#include "graph/views/breadth_first_search.hpp"
#include "graph/views/depth_first_search.hpp"
#include <stack>

#ifndef GRAPH_CC_HPP
Expand Down Expand Up @@ -103,6 +102,10 @@
}
visited[uid] = true;
component[uid] = cid;
if (!size(edges(g,u))) {
++cid;
continue;

Check warning on line 107 in include/graph/algorithm/connected_components.hpp

View check run for this annotation

Codecov / codecov/patch

include/graph/algorithm/connected_components.hpp#L106-L107

Added lines #L106 - L107 were not covered by tests
}
vertices_breadth_first_search_view<G, void> bfs(g, uid);
for (auto&& [vid, v] : bfs) {
component[vid] = cid;
Expand Down
Loading