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

feat: Unweighted shortest path #18

Merged
merged 7 commits into from
May 29, 2023
Merged

Conversation

joweich
Copy link
Collaborator

@joweich joweich commented May 27, 2023

Value add:

  • capabilities to calculate the shortest path between one start and one end vertex
  • calculation for unweighted graphs; weighted graphs will be addressed in a follow-up PR

@joweich joweich marked this pull request as draft May 27, 2023 16:28
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi there! Thank you for creating your first pull-request on the Graaf library :)

@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Patch coverage: 99.06% and project coverage change: -0.20 ⚠️

Comparison is base (23b898b) 100.00% compared to head (aaec2e0) 99.80%.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #18      +/-   ##
===========================================
- Coverage   100.00%   99.80%   -0.20%     
===========================================
  Files            9       12       +3     
  Lines          411      518     +107     
===========================================
+ Hits           411      517     +106     
- Misses           0        1       +1     
Impacted Files Coverage Δ
src/graaflib/algorithm/shortest_path.tpp 96.87% <96.87%> (ø)
src/graaflib/algorithm/shortest_path.h 100.00% <100.00%> (ø)
test/graaflib/algorithm/shortest_path_test.cpp 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@bobluppes bobluppes left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, looks very good already! Added some early feedback.

I would also be happy to merge the BFS implementation and to add support for weighted graph search in a follow-up PR.

src/graaflib/algorithm/shortest_path.tpp Outdated Show resolved Hide resolved
src/graaflib/algorithm/shortest_path.tpp Outdated Show resolved Hide resolved
src/graaflib/algorithm/shortest_path.tpp Outdated Show resolved Hide resolved
src/graaflib/algorithm/shortest_path.h Outdated Show resolved Hide resolved
src/graaflib/algorithm/shortest_path.tpp Show resolved Hide resolved
src/graaflib/algorithm/shortest_path.h Outdated Show resolved Hide resolved
@joweich joweich marked this pull request as ready for review May 28, 2023 22:11
@joweich
Copy link
Collaborator Author

joweich commented May 28, 2023

@bobluppes any idea why codecov does not catch the closing curly bracket here? Building and testing runs flawlessly

@joweich joweich changed the title feat: Shortest path feat: Unweighted shortest path May 28, 2023
@bobluppes
Copy link
Owner

@bobluppes any idea why codecov does not catch the closing curly bracket here? Building and testing runs flawlessly

This seems to be a weird quirck of lcov, I will see if we can configure the tool differently.

Currently the codecov CI does not block from merging so for this PR we can leave it as-is. In a follow-up I will configure the CI such that we don't need 100% coverage for it to pass, as I think 95% should also be fine.

Copy link
Owner

@bobluppes bobluppes left a comment

Choose a reason for hiding this comment

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

Looks very good, thanks for implementing this 🚀

@bobluppes bobluppes merged commit 1764475 into bobluppes:main May 29, 2023
3 of 5 checks passed
@joweich joweich deleted the feat/shortest_path branch May 29, 2023 11:17
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