Skip to main content

Create and use graphs theory for maths

Project description

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.

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

Gratheory-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Gratheory-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file Gratheory-0.1.1.tar.gz.

File metadata

  • Download URL: Gratheory-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for Gratheory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 313df65190d73a4d847a34e4be964fe9704e9a7abef4ced9fb014ac9b991d0dc
MD5 f848bf8b9f18bd4f77b34548dc3e721d
BLAKE2b-256 b3bf70be2a7467ef4b965698b5e9f68d92333a93e4852854b23c54f57efc13dc

See more details on using hashes here.

File details

Details for the file Gratheory-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: Gratheory-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for Gratheory-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b10b07b0eebe9430c670c1a90189977843479435590a96272da737d77e64495
MD5 7c0665886be0805c81244a38a84958e0
BLAKE2b-256 d90cafefd28313dc67470c2071e71da15894f7c452a0516e25a0714da721002d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page