Skip to content
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

Combinatorics: added in(::Int, ::Edge), signed_incidence_matrix(::Graph{Undirected}), connectivity(::Graph{Undirected}) #4450

Merged
merged 7 commits into from
Jan 13, 2025

Conversation

YueRen
Copy link
Member

@YueRen YueRen commented Jan 11, 2025

  • in(::Int, ::Edge) is self-explanatory
  • signed_incidence_matrix(::Graph{Undirected}) and connectivity(::Graph{Undirected}) for undirected graphs should work exactly as in polymake (I just relaxed the signature of the julia function)

@YueRen YueRen changed the title added in(::Int, ::Edge) and signed_incidence_matrix for undirected graphs Combinatorics: added in(::Int, ::Edge) and signed_incidence_matrix for undirected graphs Jan 11, 2025
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.41%. Comparing base (a60b0d8) to head (e16a3a5).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4450      +/-   ##
==========================================
- Coverage   84.42%   84.41%   -0.02%     
==========================================
  Files         668      668              
  Lines       88363    88441      +78     
==========================================
+ Hits        74600    74657      +57     
- Misses      13763    13784      +21     
Files with missing lines Coverage Δ
src/Combinatorics/Graphs/functions.jl 96.75% <100.00%> (+0.03%) ⬆️

... and 5 files with indirect coverage changes

@YueRen YueRen changed the title Combinatorics: added in(::Int, ::Edge) and signed_incidence_matrix for undirected graphs Combinatorics: added in(::Int, ::Edge), signed_incidence_matrix(::Graph{Undirected}), connectivity(::Graph{Undirected}) Jan 11, 2025
Copy link
Contributor

@fieker fieker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be too late to change, but here vertices seem to be integers? So in particular they are not tied to any specific graph? I'd expect s/th/ like v = G(1) to create a vertex in G, then v in some edge makes sense to me. Alternatively, V = vertices(G), v = V(1), ...

@YueRen
Copy link
Member Author

YueRen commented Jan 13, 2025

It might be too late to change, but here vertices seem to be integers? So in particular they are not tied to any specific graph?

No, graphs, edges, and vertices in Oscar are not smart like that. The vertices of a graph G are all numbered 1:n_vertices(G) with no gaps allowed. That is also why functions like rem_vertex! potentially shift the indices of the remaining vertices.

To a certain degree this is consistent with polytopes and polyhedral complexes, whose vertices are simple PointVector that do not know to which polyhedral complex they belong.

Copy link
Member

@benlorenz benlorenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connectivity is missing the export, and can you add a small test in the testsuite (in addition to the doctest)?

src/Combinatorics/Graphs/functions.jl Outdated Show resolved Hide resolved
YueRen and others added 2 commits January 13, 2025 09:23
Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
@YueRen
Copy link
Member Author

YueRen commented Jan 13, 2025

connectivity is missing the export, and can you add a small test in the testsuite (in addition to the doctest)?

Should both be added now.

@benlorenz benlorenz enabled auto-merge (squash) January 13, 2025 09:35
@benlorenz benlorenz merged commit 7219bae into master Jan 13, 2025
27 of 29 checks passed
@benlorenz benlorenz deleted the yr/minorGraphChanges branch January 13, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants