Table of Contents
This is one of my first projects in C ++, realized to put into practice the Dijktra algorithm, which takes in input a weighted Graph (in this case not oriented) and returns the shortest path tree. Node 0 is used as the source node, but of course you can change the source at any time ;)
How it works:
- Firstly, it takes as input a set of nodes and weights
- Once started you can reposition the nodes within the window area dragging them across the screen with the mouse cursor(hold left click)
- When you are happy with the look of the graph, you can go ahead and right click on "Exec Dijkstra" Button
You can change the animation speed and the sleep time of the thread that calculates dijkstra, making it faster or slower. I've tried using big and complicated graphs and it works quite well, you can try it yourself!
It's a pure C++ project. I've used a graphic library called SFML, really easy to use!
- See the documentation at SFML
Just clone the repository, install the following library, and run it in your IDE.
You only need to install one librabry to make it work:
- Installation guide: SFML
- Add Animation
- Add dijkstra exec button
- [] Add MST calculator
- [] Add graphic interface to choose witch node to start from calculating shortest path tree