Skip to main content

A package for the Dijkstra algorithm

Project description

URL for your GitHub repository: https://github.com/ColinR135/graph_colinr135.git

This package contains the Dijkstra shortest path algorithm. The algorithm can be used with the function dijkstra(graph, source) # this returns the total distance and path taken

There is also another heap project added to support the use of the algorithm heap = [] # creates an empty heap heappush(heap, item) # pushes a new item on the heap item = heappop(heap) # pops the smallest item from the heap item = heap[0] # smallest item on the heap without popping it heapify(x) # transforms list into a heap, in-place, in linear time item = heappushpop(heap, item) # pushes a new item and then returns # the smallest item; the heap size is unchanged item = heapreplace(heap, item) # pops and returns smallest item, and adds # new item; the heap size is unchanged

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_colinr135-0.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

graphs_colinr135-0.0.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file graphs_colinr135-0.0.2.tar.gz.

File metadata

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

File hashes

Hashes for graphs_colinr135-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2782c2c5096ec5b5155dcb217cd89f0e3309659d408de6e718b80013fe02f4e6
MD5 a7a38bec20abba8c690f153633a836a1
BLAKE2b-256 6aa4c05e31454d111cee1474b586c6a68fccf44c92a8779199b1c6090750fb34

See more details on using hashes here.

File details

Details for the file graphs_colinr135-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for graphs_colinr135-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82276131cdf7cd2b850ca7ae18a1be5431a14fca51aae9e7768a47231204490a
MD5 515dbbef9eda7edf8e10ddeea2ebd98a
BLAKE2b-256 f8a5d16bb2fb5d73e7ea50d0b0da9dc302f780124a2fba6af30e83c3246f0aff

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