Skip to main content

A Python package for graph algorithms including Dijkstra's shortest path

Project description

graphs_carmen

This is a Python package for graph algorithms, including Dijkstra's shortest path. It is structured for easy installation and command-line usage.

Installation

To install locally:

pip install .

Usage

Run the shortest path algorithm from the command line:

python test.py graph.txt

Graph File Format

The input file should start with the number of vertices, followed by edges in the format:

source destination weight

Example:

9
0 1 4
0 7 8
1 2 8
1 7 11
2 3 7
2 8 2
3 4 9
3 5 14
4 5 10
5 6 2
6 7 1
6 8 6
7 8 7

Output

The script prints shortest distances from the source node (0), and the shortest path to each node.

Repository

GitHub URL: https://github.com/csirhall/dijkstra-sp

Branches

  • main branch is protected
  • dev branch is used for development

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

Uploaded Source

Built Distribution

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

graphs_csirhall-0.0.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for graphs_csirhall-0.0.2.tar.gz
Algorithm Hash digest
SHA256 515c67a1739f0f34dfb15d25adae022eb710dae1a6272ba56d11f53ac99aa96c
MD5 de333600194317b5e0061beff8e76c3f
BLAKE2b-256 ca31588444f52c64bead7e7edf92b570daeb7acc2c3a6a2a2428cd7850e12ffb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphs_csirhall-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 40d553e3dbff496cf7dca21d4997bb3116326e4dcbf580bf13c9b9f96ec4ef49
MD5 b9a2a1605fe23870f8d47dd340d0835a
BLAKE2b-256 8640736f100ae6e8b1fcec8a9fdc60fb10208d7d1328aebd96eb90d9eeba7777

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