How rayarka26/shortest_finder works
This is a browser-based travel-planning demo: the user generates a weighted city graph, then asks for the least-time route, which is displayed in a second graph. The main workflow and its algorithmic stages are implemented together in script.js. The README also describes graph-algorithm capabilities; djikstra.js and graph.js contain standalone console examples, but the sampled code does not show them connected to the website. index.html and styling are represented by their tree paths; their wiring was not sampled.
Main entry points: script.js Page controller · djikstra.js Dijkstra example · graph.js Graph example
Components 14
Browser interface
- Page structure
index.html - Page styling
style.css - Page controller
script.js - Question graph
script.js - Result graph
script.js
Route planning
- Graph generation
script.js - Bus graph conversion
script.js - Dijkstra distances
script.js - Plane comparison
script.js - Route reconstruction
script.js
Algorithm examples
- Dijkstra example
djikstra.js - Graph example
graph.js
Other components
- Traveler
- vis Network
Connections 16
- Traveler → Page controller: requests graph or solution
- Page controller → Graph generation: generates graph
- Page controller → Question graph: sets graph data
- Question graph → vis Network: renders network
- Page controller → Bus graph conversion: builds bus graph
- Page controller → Dijkstra distances: computes from endpoints
- Bus graph conversion → Dijkstra distances: supplies adjacency list
- Page controller → Plane comparison: compares plane routes
- Dijkstra distances → Plane comparison: supplies distances
- Page controller → Route reconstruction: reconstructs route
- Dijkstra distances → Route reconstruction: supplies predecessors
- Plane comparison → Route reconstruction: supplies selected plane
- Page controller → Result graph: sets solution data
- Result graph → vis Network: renders network
- Dijkstra example → Dijkstra example: logs distances
- Graph example → Graph example: logs adjacency list