Skip to content
AmitSheer edited this page Jan 8, 2021 · 14 revisions

Welcome to the DWGraphWithAlgo wiki!

This Project has three parts:

  1. Directed-Weighted Graph
  2. Algorithms and Visuals
  3. Comparative results

Directed-Weighted Graph

This class and function represent give the user an interface to work with create a Directed-Weighted Graph, or DiGraph for short. It contains two main classes:

  • DiGraph
    Represents a Directed-Weighted Graph
  • NodeData
    Represents a node in the graph

Algorithms and Visuals

This section is dedicated to the GraphAlgo class. Its is used in order to run four main methods.

  1. connected_component and connected_conmponents
    Finds and returns the strongly connected component of a specific node and all strongly connected components, respectively, in a given graph. In order to achieve that it uses Tarjan's strongly connected components algorithm
    Tarjan's_Algorithm_Animation
  2. shortest_path
    Finds the shortest path from source node to the dest node, while taking into account the problem of weighted edges between nodes. To solve that issue, Dijkstra's algorithm was implemented
    Dijkstra_Animation\
  3. Visualize the Graph
    Responsible of Drawing the graph in the, using matplotlib to do that.\

Comparative results

In this part i compared the results of my implementation of the algorithms against NetworkX library and my implementation of the algorithms in Java(to view implementation view here)
The comparison was made using runtimes and accuracy of results(please refer to this link to view the graphs used)

Clone this wiki locally