An app for creating and traversing through maps using graph datastructure.
GitGuide to Git Installing GitPython 3.5 or higherPipGuide to installing pipPipenvPipenv documentation
- After installing the
prerequisitesabove, clone the repository Develop branch using this commandgit clone -b develop https://github.com/ja-odur/map.git - Change into the newly cloned repo through
cd map
- Using pipenv, start the environment and install requirements
- $
pipenv shell - $
pipenv install. That didn't work, trypipenv install --skip-lock
- Import the Map class
from map import Map - Instantiate the Map class
graph = Map(['place1', 'place2', 'place3']) - Add edges between any of the places
graph.add_edge('place1', 'place3') - Find the shortest path between two places
graph.shortest_path('place1', 'place3') - Topologically sort DAG (Directed Acyclic Graphs)
graph.topological_sort() - Establish the minimum spanning tree
graph.minimum_spanning_tree()