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 Hopcroft-Karp matching algorithm #15

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

Robbybp
Copy link
Collaborator

@Robbybp Robbybp commented Aug 3, 2023

This PR adds an implementation of the Hopcroft-Karp bipartite matching algorithm to fix the performance issues noted in #8. This implementation is a placeholder until JuliaGraphs/Graphs.jl#291 is merged.

It also fixes a quadratic loop in dulmage_mendelsohn due to repeatedly checking inclusion in a vector.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #15 (fe60062) into main (b932bcc) will decrease coverage by 0.03%.
The diff coverage is 98.00%.

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   97.69%   97.66%   -0.03%     
==========================================
  Files           8        8              
  Lines         304      343      +39     
==========================================
+ Hits          297      335      +38     
- Misses          7        8       +1     
Files Changed Coverage Δ
src/maximum_matching.jl 95.52% <97.95%> (+2.66%) ⬆️
src/dulmage_mendelsohn.jl 98.38% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Robbybp
Copy link
Collaborator Author

Robbybp commented Aug 3, 2023

Failing test is coverage. There is an error we throw if Hopcroft-Karp encounters a non-bipartite graph that we never hit. This seems fine to me.

@Robbybp Robbybp merged commit 1a627ad into lanl-ansi:main Aug 4, 2023
@Robbybp Robbybp deleted the local-hk-matching branch August 9, 2023 17:01
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.

1 participant