Commit 977b4516 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix degree() for filtered undirected graphs

This fixes issue #435
parent 635b9675
Pipeline #400 failed with stage
in 464 minutes and 52 seconds
......@@ -408,7 +408,10 @@ typename filt_graph<G, EP, VP>::degree_size_type
degree(typename filt_graph<G, EP, VP>::vertex_descriptor u,
const filt_graph<G, EP, VP>& g)
{
return in_degree(u, g) + out_degree(u, g);
if (is_directed(g))
return in_degree(u, g) + out_degree(u, g);
else
return out_degree(u, g);
}
template <typename G, typename EP, typename VP>
......
Supports Markdown
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