Commit 9c3246a4 authored by Tiago Peixoto's avatar Tiago Peixoto

graph_adjacency.hh: improve removal or last vertex

parent e30fbc4f
Pipeline #714 passed with stage
in 131 minutes and 3 seconds
...@@ -1201,7 +1201,11 @@ void remove_vertex(Vertex v, adj_list<Vertex>& g) ...@@ -1201,7 +1201,11 @@ void remove_vertex(Vertex v, adj_list<Vertex>& g)
g._edges.erase(g._edges.begin() + v); g._edges.erase(g._edges.begin() + v);
size_t N = g._edges.size(); size_t N = g._edges.size();
#pragma omp parallel for schedule(runtime) if (N > 100)
if (v == N)
return;
#pragma omp parallel for schedule(runtime) if (N > 1000)
for (size_t i = 0; i < N; ++i) for (size_t i = 0; i < N; ++i)
{ {
for (auto& e : g._edges[i].second) for (auto& e : g._edges[i].second)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment