-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Durham Workshop 2024 (Yue's group) #4328
base: master
Are you sure you want to change the base?
Conversation
458bc42
to
fc7db25
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4328 +/- ##
==========================================
- Coverage 84.50% 84.43% -0.08%
==========================================
Files 644 647 +3
Lines 85606 85954 +348
==========================================
+ Hits 72339 72571 +232
- Misses 13267 13383 +116
|
6feddb4
to
70702aa
Compare
function check_i_valency(G::Graph, i::Int) | ||
return all(v -> degree(G, v) == i, vertices(G)) | ||
end | ||
|
||
function check_i_connectivity(G::Graph, i::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually name such function is_*
, so in this case maybe is_i_valent
and is_i_connected
. check_*
functions usually throw an error if their desired property is not satisfied, e.g. check_parent(a, b)
checks that a
and b
have the same parent and throws otherwise
return all(v -> degree(G, v) == i, vertices(G)) | ||
end | ||
|
||
function check_i_connectivity(G::Graph, i::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add an Oscar wrapper for connectivity from polymake:
julia> g = complete_graph(4)
Undirected graph with 4 nodes and the following edges:
(2, 1)(3, 1)(3, 2)(4, 1)(4, 2)(4, 3)
julia> Polymake.graph.connectivity(g)
3
This should be a lot faster since it uses network flow instead of a brute-force approach with lots of graph copies.
But this only works for undirected graphs. For directed graphs it would be unclear what kind of connectivity this should imply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, that sounds like a good idea and should probably be part of this pull request. Give me some time to clean everything up next week.
Changes by my group