Skip to content

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

Notifications You must be signed in to change notification settings

ambrosdavid/Dijkstra-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published