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:
Simple functions for creating a graph, adding\removing nodes and edges.
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..
https://github.com/RazGavrieli/Directed-Weighted-Graph-in-Python/wiki
- 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.
Libraries used: pygame, matplotlib, easygui
Authors: Raz Gavrieli, Eran David, Amit Melamed