Skip to content

Conversation

@aiAdrian
Copy link
Contributor

Description

This function implements (experiments) with specialized Dijkstra algorithm to compute shortest paths from a starting node to multiple target nodes in a directed graph. It incorporates additional constraints such as train connections, departure and arrival times, and section successors. To enhance performance, it uses a cache to store precomputed graph structures.

Issues

Checklist

  • This PR contains a description of the changes I'm making
  • I've read the Contribution Guidelines
  • I've added tests for changes or features I've introduced
  • I documented any high-level concepts I'm introducing in documentation/
  • CI is currently green and this is ready for review

@aiAdrian aiAdrian self-assigned this Oct 20, 2025
@aiAdrian aiAdrian marked this pull request as draft October 20, 2025 15:10
@aiAdrian aiAdrian changed the title Performance performance_computeShortestPaths_ai_Dijkstra Oct 20, 2025
const conn = new Int32Array(n);
const visited = new Uint8Array(n);

class FastHeap {
Copy link
Contributor

Choose a reason for hiding this comment

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

That's the bit I'd like to avoid (would it be better to import an existing lib?)

That being said, how's the perf?

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