ambrosdavid / Dijkstra-Simulator

C++ and SFML Project that simulates dijkstra algorithm on a non oriented Graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dijkstra-Simulator

LinkedIn

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Acknowledgments

About The Project

drawing drawing

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!

Built With

It's a pure C++ project. I've used a graphic library called SFML, really easy to use!

  • See the documentation at SFML

Getting Started

Just clone the repository, install the following library, and run it in your IDE.

Prerequisites

You only need to install one librabry to make it work:

  • Installation guide: SFML

Roadmap

  • Add Animation
  • Add dijkstra exec button
  • [] Add MST calculator
  • [] Add graphic interface to choose witch node to start from calculating shortest path tree

Acknowledgments

(back to top)

About

C++ and SFML Project that simulates dijkstra algorithm on a non oriented Graph


Languages

Language:C++ 71.7%Language:Makefile 28.3%