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

Fix sanity checks for Eulerian trail #397

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

evanfields
Copy link
Contributor

The sanity check for a graph having an Eulerian trail was incorrect: for a connected simple graph to have an Eulerian trail there must be exactly two odd degree vertices, but the existing code checks for exactly two even degree vertices. The current test happened to test on a 4-vertex graph with two even and two odd degree vertices, so the test passed.

I just flipped the check and added the relevant tests.

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.32%. Comparing base (aa3d197) to head (8f65af2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   97.31%   97.32%   +0.01%     
==========================================
  Files         120      120              
  Lines        6953     6953              
==========================================
+ Hits         6766     6767       +1     
+ Misses        187      186       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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.

thank you!

@gdalle gdalle merged commit 8b2cb94 into JuliaGraphs:master Sep 5, 2024
9 checks passed
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.

2 participants