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

Fix degree() for filtered undirected graphs

This fixes issue #435
parent 635b9675
......@@ -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>
......
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