Skip to content

Improve dijkstra#58

Merged
papjuli merged 7 commits into
mainfrom
improve_dijkstra
Jun 29, 2025
Merged

Improve dijkstra#58
papjuli merged 7 commits into
mainfrom
improve_dijkstra

Conversation

@papjuli

@papjuli papjuli commented Jun 29, 2025

Copy link
Copy Markdown
Collaborator

Implement a bidirectional Dijkstra, and use PriorityQueue.push_increase

@papjuli papjuli requested review from Copilot and lukacslacko June 29, 2025 09:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a bidirectional version of Dijkstra’s algorithm, updates the UI to use it, and ensures basic testing and CI are in place.

  • Implement bidirectional_dijkstra alongside updates to the existing dijkstra function.
  • Swap calls in ui.rs from dijkstra to bidirectional_dijkstra.
  • Add a simple GridPoint test and include tests in CI.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ui.rs Imported and invoked bidirectional_dijkstra instead of dijkstra.
src/dijkstra.rs Added bidirectional_dijkstra, refactored dijkstra, and added timing.
src/test.rs Added basic equality tests for GridPoint.
src/main.rs Registered test module under cfg(test).
.github/workflows/ci.yml Added a step to run cargo test --all in CI.
Comments suppressed due to low confidence (1)

src/test.rs:3

  • The new bidirectional_dijkstra function isn’t covered by any tests. Consider adding tests that verify it returns the same path as the unidirectional version on simple graphs.
#[test]

Comment thread src/dijkstra.rs Outdated
Comment thread src/dijkstra.rs
papjuli and others added 2 commits June 29, 2025 16:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… it outside of bidirectional_dijkstra function
@papjuli papjuli merged commit 8dca137 into main Jun 29, 2025
1 check 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.

3 participants