Repository navigation
Add VNAlgorithm and dispatch clique_number to very_nauty - #37
Closed
singhharsh1708 wants to merge 1 commit into
Closed
singhharsh1708 wants to merge 1 commit into
singhharsh1708 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 45.90% 52.23% +6.33%
==========================================
Files 1 1
Lines 61 67 +6
==========================================
+ Hits 28 35 +7
+ Misses 33 32 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 7, 2026
singhharsh1708
force-pushed
the
feat/vnalgorithm
branch
from
September 7, 2026 08:03
3f63af6 to
10206d9
Compare
singhharsh1708
force-pushed
the
feat/vnalgorithm
branch
from
September 7, 2026 09:08
10206d9 to
03eafef
Compare
Member
|
LLM work from new contributors is not acceptable for bounties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
VNAlgorithmand the first operation dispatched through it:clique_number(g, ::VNAlgorithm)converts to aVNGraphwhen it has to and callsgraph_clique_number, where Graphs.jl otherwise enumerates every maximal clique and takes the longest.This is not a faster implementation, it is a different one worth being able to select. On dense graphs the C routine wins, 13.4 ms against 33.7 ms at 60 vertices and edge probability 0.7. At probability 0.5 it loses, 8.1 ms against 4.6 ms at 60 vertices and 14.8 against 8.8 at 70. The answers always agree: on all 54 random graphs I measured across sizes 10 to 80 and densities 0.3 to 0.9, and the test draws 30 fresh random graphs on every run along with the complete graph, a path, an edgeless graph and a single vertex.
very_nautykeeps its clique search state in a file scope global, so concurrent calls corrupt each other: four threads making 400 calls segfaulted the process. The C call is therefore made under a package lock, and the test runs 64 calls across threads, which CI exercises att=2.The directed case needs a guard.
Graphs.clique_numberrefuses a directed graph through its!IsDirectedtrait, butVNGraph(::AbstractSimpleGraph)accepts aSimpleDiGraphand quietly drops the direction, so without the check this method would answer for the underlying undirected graph where Graphs.jl errors. That conversion accepting a digraph at all looks wrong to me, but changing it belongs in its own PR.clique_numberentered Graphs.jl in 1.14, so the[compat]floor moves from 1.12 to 1.14. On the empty graph the C routine returns 0 where Graphs.jl throws, and the test pins the 0. 180 tests pass on 1.10; removing the block leaves the test failing onUndefVarError: VNAlgorithm.Overlap I should flag rather than let you find: #26 also introduces a
VNAlgorithmand dispatchesclique_number, along with chromatic numbers, connected components, a README rewrite and benchmarks. It has been unchanged since April, after you asked for it to be split. This is that split, as one operation, with the agreement and timing measured.The red lanes here are red on master too, for missing files and a runner architecture this does not touch.
Part of JuliaGraphs/Graphs.jl#448, independent of #33 to #36.
AI Disclosure: Claude assisted with the code. Testing and review by @singhharsh1708.