Fix vertices(G) to return all vertices, including isolated ones#4633
Fix vertices(G) to return all vertices, including isolated ones#4633
vertices(G) to return all vertices, including isolated ones#4633Conversation
IIUC, their graphs are all connected, and thus in particular have no isolated vertices. |
Should there be one (small) testing case with an isolated vertex to prevent future regression? (Given that the authors did not come across the corner case by themselves, this might be a sensible idea.) |
This new testcase for vertices has many isolated vertices: Oscar.jl/test/Combinatorics/Graph.jl Lines 4 to 7 in 31c935c In Oscar 1.2.2: julia> g = Graph{Directed}(5)
Directed graph with 5 nodes and no edges
julia> vertices(g)
ERROR: ArgumentError: reducing over an empty collection is not allowed; consider supplying `init` to the reducer |
Thank you! I had overlooked that one. No further comments from me. |
vertices(G) to return all vertices, including isolated ones
fixes #4426
cc: @YueRen, @bkholler
The tests in algebraic statistics all seem to pass even with this change, so I don't think we need
vertices_with_positive_degree.