GithubHelp home page GithubHelp logo

abraxas4 / dijkstra Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

This repo contains a Python implementation of Dijkstra's algorithm with interactive visualization. It uses NetworkX and Matplotlib to display the graph, compute shortest paths, and animate paths upon clicking nodes. Modify the graph and start node as needed, then run the script to explore paths.

Python 100.00%

dijkstra's Introduction

dijkstra

This repository contains a Python implementation of Dijkstra's algorithm for finding the shortest path in a weighted graph. The code demonstrates how to visualize the graph, compute the shortest paths, and interactively display the shortest path to a node upon clicking on it.

Key features:

Uses NetworkX library for graph representation and manipulation Visualizes the graph using Matplotlib for a clear understanding of the node and edge relationships Implements Dijkstra's algorithm to find the shortest paths from a given start node to all other nodes in the graph Reconstructs the shortest path from start node to a target node using the previous nodes information Animates the shortest path when a node is clicked on the graph, providing an interactive way to explore the shortest paths Provides a clear display of the shortest path distances and the actual paths from the start node to other nodes on the graph To run the code, simply execute the script. The graph is defined within the script, and you can modify it as needed. By default, the start node is set to 'A', but you can change it as desired. After running the script, a graphical representation of the graph will be displayed. Click on any node to see the shortest path from the start node to the clicked node animated on the graph.

GUI :

image

dijkstra's People

Contributors

abraxas4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.