Skip to content

Files

Latest commit

 

History

History
28 lines (24 loc) · 1.49 KB

File metadata and controls

28 lines (24 loc) · 1.49 KB

Directed Weighted Graph implementation in Python

Introduction

Introduction

This project was created for OOP class, October 2021, in Ariel University.
Its an implementation of a Directed Weighted Graph in python. There are two main files: DiAlgo.py and GraphAlgo.py:

DiGraph

Simple functions for creating a graph, adding\removing nodes and edges.

GraphAlgo

Contains a DiGraph, and has more advanced functions for analzying a graph.
You can run Dijikstra's algorithm, run GUI, finding the center node and more..

Read more about the project in the wiki tab

https://github.com/RazGavrieli/Directed-Weighted-Graph-in-Python/wiki

How to use - READ THIS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  • Clone the project into your computer and run in the IDE of your choice.
  • For each file, go to the import section at first lines, and install the different libraries. At this step the IDE should offer you to install the relevant packages.
  • Go to main.py and inside the check() function write the commands of your choice.
    There are 4 examples (check0-3()) in main.py for you to read and understand the way of initializing and running a graph.

Note that depending on your IDE you might need to 'build' the project before running it.

Credits

Libraries used: pygame, matplotlib, easygui
Authors: Raz Gavrieli, Eran David, Amit Melamed