Commit be38bf3b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

graph/graph_extended_clustering.cc: check for self-edges


git-svn-id: https://svn.forked.de/graph-tool/trunk@41 d4600afd-f417-0410-95de-beed9576f240
parent 20fc25d0
......@@ -106,6 +106,8 @@ struct get_extended_clustering
// And now we setup and start the BFS bonanza
for(tie(a, a_end) = adjacent_vertices(*v, g); a != a_end; ++a)
{
if (*a == *v) // no self-loops
continue;
if (neighbours.find(*a) != neighbours.end()) // avoid parallel edges
continue;
neighbours.insert(*a);
......
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