TypeScript implementation of Dijkstra's algorithm.
Dijkstra's algorithm (or Dijkstra's Shortest Path First algorithm, SPF algorithm) is an algorithm for finding the shortest paths between nodes in a graph. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.
Create nodes by setting a value, a size and a color. Then, link them by clicking on the link button and setting a distance between them.
Finally, you can get the shortest path between two nodes by setting an origin and destiny node in the "Calculate shortest path" section.
You can find a demo of the project here: TypeScript Dijkstra's algorithm demo
Firstly, install TypeScript (via npm):
npm install -g typescript
Then, clone a copy of the repository:
git clone https://github.com/lluiscamino/ts-dijkstra-algorithm.git
Change to the ts-dijkstra-algorithm
folder:
cd ts-dijkstra-algorithm
Install dependencies:
npm install
And finally, compile the code:
tsc -w
This project is licensed under the MIT License - see the LICENSE file for details.