Skip to content
RazGavrieli edited this page Dec 22, 2021 · 2 revisions

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

How to use

Clone the project into your computer and run in the IDE of your choice. Then, 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