Create and use graphs theory for maths
Project description
Graphly - A mathematical graphing module for python
Create a graph -
from Graphly import graph
g = graph(l, oneWayEdges = k)
where l is a list of edges in the format of [A, B, C] is an edge from A to B with weighting of C and oneWayEdges is a boolean of whether edges go in both directions or not.
To find the shortest path, use g.findShortestPath(start, end, searchType = A) where start is the start vertex, end is the end vertex and searchType is either 'Ford' or 'Djikstra' deciding which algorithm to implement, the default being 'Ford'.
Depth first search and Breadth first search will return a list of reachable vertices from a given vertex. Callable with method, DFS and BFS.
Project details
Release history Release notifications | RSS feed
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
Hashes for Gratheory-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8a2e35fc3d6e7c2fbbb4012ef2f27d6a32d240942cff92865b9cedd006c3d07 |
|
MD5 | 001ba0368cbb483e44444ba821d818e3 |
|
BLAKE2b-256 | c2c4b7a7ea91e0e2f19df83820c12594d34819ab7a04d86d2654c00f2f7f0bbf |