Skip to main content

Graph algorithms package featuring Dijkstra's shortest path

Project description

graphs_wendyhielo

A lightweight Python package for working with weighted graphs, centered on Dijkstra's shortest path. 

What it does:

* computes single-source shortest paths on weighted, directed graphs (non-negative weights) using a min-heap-based Dijkstra implementation. 
* Returns a distance list with the minimum cost from the source to each vertex and a path map that lets you reconstruct shortest paths. 

How it works:

*The graph is represented as an adjacency map (each vertex maps to a dictionary of neighbors → edge weights).
*A min-heap stores candidate vertices keyed by their best-known distance from the source.
*Distances initialize to “infinity” except the source (zero). The algorithm relaxes edges until the heap is empty.

Installation (no code)

1. Clone this public repository to your machine.

2. From the project root, install the package with your standard Python package manager (e.g., pip).

3. After installation, the package is importable as graphs_wendyhielo, and the shortest-path functions are available in its sp module.

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

graphs_wendyhielo-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

graphs_wendyhielo-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file graphs_wendyhielo-0.1.0.tar.gz.

File metadata

  • Download URL: graphs_wendyhielo-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for graphs_wendyhielo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e881a7a765e2cc724220b502476e408271f97aa000462ea23b17f6e3f4828588
MD5 4b55716fbc224d656d934f058f296140
BLAKE2b-256 3160099974af04222c8e1f7f53d19e31f65bca95c65213dfbe2d00cbeb0d1b5a

See more details on using hashes here.

File details

Details for the file graphs_wendyhielo-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for graphs_wendyhielo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76917297fe4a761f7c38c9abcaa6e1d613365aad09c63c808bfe8cde0a6ac882
MD5 29119c87424fd9b40885376d92928a26
BLAKE2b-256 c5bec39c7d02130eab9336b577e36f98ba6a161dbc3396083cb981d599fe9976

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