Graphs and Depth First Search
Project description
Graph-DFS
This package allows for the creation of graphs. It also provides the depth first search algorithm.
Installation
pip install graph-dfs
How to use it?
To create a graph, do:
g = Graph(n)
where n is the number of vertices. To create an arc from
vertex a to vertex b, do:
g.link(a, b)
where a and b are indices in the range [0, n - 1]. You can perform a depth first search on the graph
with:
dfs = DFS(g)
dfs.start()
If you desire to obtain a topological sorting of the graph, then do so after a DFS with:
dfs.topological_sorting()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graph-dfs-0.0.8.tar.gz.
File metadata
- Download URL: graph-dfs-0.0.8.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.7.10 Linux/5.3.0-28-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4af78818a10c5b1a462e01354c45df272d76933ebab23aa8174467904ff381e1
|
|
| MD5 |
f5563f44d8232a659ee635a753c40518
|
|
| BLAKE2b-256 |
5536321f733de11160cac5f09b444e0a593941ad960d7744dd016fe75a388b43
|
File details
Details for the file graph_dfs-0.0.8-py3-none-any.whl.
File metadata
- Download URL: graph_dfs-0.0.8-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.7.10 Linux/5.3.0-28-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
142bc87f91d5f86edc040e642323bdbbc7ae6f7704bf048c330ff390e42d5eb2
|
|
| MD5 |
6e0ea7ca9fdec60707bad1640d6eb026
|
|
| BLAKE2b-256 |
b1cf1ba0e778a3bb3b66b8a4a601baff5f4732e08bf870815743fdf1756583ff
|