Skip to content

fix(alg): correct three shortest-path bugs - #161

Merged
jsavyasachi merged 3 commits into
masterfrom
fix/alg-shortest-paths
Sep 23, 2026
Merged

jsavyasachi merged 3 commits into
masterfrom
fix/alg-shortest-paths

Conversation

@jsavyasachi

Copy link
Copy Markdown
Collaborator

Fixes three bugs in the shortest-path family. Each has a regression test that fails on master.

  • bf-path: when start equals end, return [start]. It previously returned nil.
  • johnson: the returned distances included the Bellman-Ford potentials used to remove negative weights. They are now the original path distances.
  • astar-path: closed nodes are reopened when a shorter path is found, so paths stay optimal with an inconsistent heuristic.

@jsavyasachi
jsavyasachi merged commit 9cee365 into master Sep 23, 2026
15 checks passed
jsavyasachi added a commit that referenced this pull request Sep 26, 2026
docs(changelog): add shortest-path fixes for #161
NotAFlightRisk pushed a commit to NotAFlightRisk/loom that referenced this pull request Sep 30, 2026
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