This project was made by Enrico Biancotto in 2017, it is a Javascript implementation of Dijkstra's Algorithm. As input it uses a txt file formatted as follows:
- Number-of-nodes Start-node End-node
- Node-1 Node-2 Weight
- Node-2 Node-3 Weight
- ...
Example prova.txt: 5 4 3 0 1 3 1 2 3 2 4 3 0 3 5
Example prova-3.txt: 5 0 1 3 1 2 3 2 4 3 0 3 5 (You will have to choose starting and ending nodes before graph is showed so be careful)
This project is entirely based on:
Clone this repository or download in your local computer
- git installed or click download
git clone https://github.com/enricBiancott0/dijkstra
- Open terminal and check installation typing, if nothing prompts install Git
git --version
- Open terminal and check installation typing, if nothing prompts install NPM
npm
- Install Npm dependencies
- Open terminal and type, it will create node_modules with package.json file
npm i
Open index.html, drag and drop prova.txt or prova-2.txt or prova-3.txt
Enrico Biancotto - @enricobiancotto - [email protected]
Project Link: https://github.com/enricBiancott0/dijkstra