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

Use GenericGraph for testing biconnectivity algorithms #270

Conversation

simonschoelly
Copy link
Contributor

This PR changes the biconnectivity algorithms so that they test with GenericGraph instead of SimpleGraph.

With this, I discovered an error, where we incorrectly assumed that the result of outneighbors(g, v) is indexable. To work around this without , I added a function collect_if_not_vector that converts the result of outneighbors to a vector unless it is already one. In the future we might think, if we either should adjust these algorithms, or instead require the neighbor functions to always return an indexable collection.

@simonschoelly simonschoelly self-assigned this Jul 2, 2023
@simonschoelly simonschoelly force-pushed the test-biconnectivity-with-generic-graph branch from cd9fadd to caeb9e5 Compare July 2, 2023 16:48
@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #270 (85e97f1) into master (3c97457) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
+ Coverage   97.17%   97.19%   +0.01%     
==========================================
  Files         114      114              
  Lines        6656     6658       +2     
==========================================
+ Hits         6468     6471       +3     
+ Misses        188      187       -1     

@gdalle
Copy link
Member

gdalle commented Jul 2, 2023

@etiennedeg interesting insight here

Copy link
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

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

Good eye! This looks fine to me so I'm merging, but @simonschoelly maybe we should put a progress tracker in issue #224 so that we know where generic graphs are used in testing already?

@gdalle gdalle merged commit d29e1f2 into JuliaGraphs:master Jul 2, 2023
12 checks passed
@simonschoelly
Copy link
Contributor Author

Good eye! This looks fine to me so I'm merging, but @simonschoelly maybe we should put a progress tracker in issue #224 so that we know where generic graphs are used in testing already?

Right, I will do that after my next PR

@simonschoelly simonschoelly deleted the test-biconnectivity-with-generic-graph branch July 2, 2023 20:32
@simonschoelly simonschoelly mentioned this pull request Jun 29, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants