Skip to content

Skye797/Gratheory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gratheory - A mathematical graphing module for python

Create a graph -

from gratheory 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages