Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imagemlt/pygraphalgorithm
graph algorithms in python
https://github.com/imagemlt/pygraphalgorithm
Last synced: about 8 hours ago
JSON representation
graph algorithms in python
- Host: GitHub
- URL: https://github.com/imagemlt/pygraphalgorithm
- Owner: imagemlt
- Created: 2017-06-12T08:31:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T08:03:20.000Z (over 7 years ago)
- Last Synced: 2023-10-19T19:10:25.798Z (about 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyGraphAlgorithm
This script contains a simple graph and some useful functions
### Function List
+ BFS
+ DFS
+ TopologicalSort\_indgree
+ TopologicalSort\_dfs
+ Kruskal
+ Prim
+ Dijikstra
+ Bellman-Ford
+ Floyd### Usage
First,type in the vertices ,-1 for an end;
Then type in the edges in the format of vertice1 vertice2 cost line by line for an end;
then it will run the above functions.
*Unfortunately I don't know how to tell the loop in the nonrecurse method of dfs ToplogicalSort.
If you have good ideas please contact me.*###### [My Wordpress](http://blog.imagemlt.ml)