https://github.com/camilamaia/graph
A implementation of Dijkstra's algorithm for finding the shortest paths between nodes in a graph
https://github.com/camilamaia/graph
graph python python-2 university-project
Last synced: over 1 year ago
JSON representation
A implementation of Dijkstra's algorithm for finding the shortest paths between nodes in a graph
- Host: GitHub
- URL: https://github.com/camilamaia/graph
- Owner: camilamaia
- Created: 2013-09-07T12:47:33.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-02-19T14:21:21.000Z (over 8 years ago)
- Last Synced: 2024-10-19T02:29:34.149Z (over 1 year ago)
- Topics: graph, python, python-2, university-project
- Language: Python
- Homepage: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Graph - Dijkstra's Algorithm Implementation
=====
A implementation of Dijkstra's algorithm for finding the shortest paths between nodes in a given graph.
Software developed for the Graph Class INE5413, of the Department of Informatics and Statistics of the Federal University of Santa Catariana in the second semester of 2013.
## How to Run
Inside the project directory, run:
```bash
$ ./bin/graph
```
By default, the script uses the graph below to calculate the shortest paths between nodes:
```python
{
A {'B': 7, 'G': 3, 'F': 5}
C {'B': 2, 'E': 3, 'D': 5, 'G': 2}
B {'A': 7, 'C': 2, 'G': 3}
E {'C': 3, 'D': 4, 'G': 4, 'F': 6}
D {'C': 5, 'E': 4}
G {'A': 3, 'C': 2, 'B': 3, 'E': 4, 'F': 3}
F {'A': 5, 'E': 6, 'G': 3}
}
```
If you want to provide your own graph, run the script with the `Create your own graph` option:
```bash
$ ./bin/graph -c
```