bitwalker / libgraph

A graph data structure library for Elixir projects
MIT License
524 stars 75 forks source link

Allow running Graph.Reducers.Bfs on graphs whose inbound edges have been deleted #32

Closed QuinnWilton closed 1 year ago

QuinnWilton commented 4 years ago

The bfs reducer populates the initial queue by including all vertices who do not appear in the graph's in_edges. This check isn't sufficient for the case where a vertex had an inbound edge, which is then deleted from the graph, leaving an empty set in it's place.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.01%) to 96.057% when pulling a54487d9dae9b57905d060881abe18eab102e516 on QuinnWilton:bfs-inbound-edges into 493d91d214418bbd9607881bb1db270352b27a26 on bitwalker:master.

bitwalker commented 1 year ago

Thanks for the PR, not sure why I failed to get this merged previously, seems to have fallen off my radar.