Add VNAlgorithm dispatch for very_nauty C library algorithms#19
Add VNAlgorithm dispatch for very_nauty C library algorithms#19nenadilic84 wants to merge 2 commits intoJuliaGraphs:masterfrom
Conversation
- Implement edges iterator (VNGraphEdgeIterator) for memory-efficient edge traversal without collecting to array - Implement outneighbors/inneighbors returning sorted 1-based indices - Fix has_edge to convert 1-based Julia indices to 0-based C indices - Add rem_edge! using graph_del_edge from C library - Add add_vertex! using graph_add_node from C library - Add copy for independent graph duplication - Fix vertices return type annotation - Add GraphsInterfaceChecker.jl compliance tests - Add comprehensive tests for edges, neighbors, mutation, copy, and round-trip consistency with various graph types
- Add VNAlgorithm dispatch type for routing algorithms to very_nauty - Dispatch is_connected(g, VNAlgorithm()) via graph_connected - Dispatch connected_components(g, VNAlgorithm()) via graph_nclusters with cluster label extraction - Add chromatic_number(g, VNAlgorithm()) for exact chromatic number - Add edge_chromatic_number(g, VNAlgorithm()) for exact edge chromatic number - Add clique_number(g, VNAlgorithm()) for exact clique number - Auto-conversion: all methods accept any AbstractGraph, converting to VNGraph internally when needed - Comprehensive tests for all algorithms with known graph properties
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19 +/- ##
===========================================
+ Coverage 45.90% 86.52% +40.62%
===========================================
Files 1 1
Lines 61 141 +80
===========================================
+ Hits 28 122 +94
+ Misses 33 19 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
All CI test jobs pass across all platforms (ubuntu, windows, macOS x64, macOS aarch64). The only failing check is Documentation — same pre-existing issue as PR #18 (no |
|
There were a few other PRs by you on projects for which we have bounties. Some of them have received full or partial reviews over the last few month or two without a follow up from you. Of course, as a volunteer you do not owe us anything, and we are always grateful when someone contributes to our packages. However, given the lack of response, and the fact that the PRs seem to have been generated by an LLM, reviewing more of these PRs creates a very significant burden on the reviewers. Thus, I will proceed to close this PR. It is certainly possible you just happen to be too busy to respond to those PR comments right now. If that is the case, please feel free to reopen PRs you would like to pursue whenever you find some free time -- humans jumping on board to help is always appreciated. |
Summary
Adds a
VNAlgorithmdispatch type that routes graph algorithms to the very_nauty C library implementation, following the pattern specified in JuliaGraphs/Graphs.jl#448.New API
Design
VNAlgorithmis an exported dispatch typeAbstractGraphand auto-convert toVNGraphinternally when neededis_connectedandconnected_componentsextend existingGraphs.jlfunctionschromatic_number,edge_chromatic_number, andclique_numberare new functions exported from VNGraphs (these algorithms don't exist in Graphs.jl yet)Algorithms dispatched
Graphs.is_connected(g, ::VNAlgorithm)graph_connectedGraphs.connected_components(g, ::VNAlgorithm)graph_nclusters+ cluster labelsVector{Vector{Int}}chromatic_number(g, ::VNAlgorithm; timeout=0)graph_chromatic_numberedge_chromatic_number(g, ::VNAlgorithm; timeout=0)graph_edge_chromatic_numberclique_number(g, ::VNAlgorithm)graph_clique_numberBounty checklist progress (Graphs.jl#448)
VNAlgorithmAll 307 tests pass locally on Julia 1.11.