Skip to main content

Copyright (c) 2016 David McDougall

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description: Common Graph Algorithms Library

Library of graph algorithms which operate directly on python data structures.

This library uses a novel API for representing graphs. Graph vertexes can be any hashable python value and the connectivity between vertexes is represented with a callback function. This callback is named the ‘adjacent’ function. The adjacent function has the following form:

def adjacent(vertex):

‘’’ This function returns all vertexes which the given vertex is connected to. ‘’’ return iterable-of-neighboring-vertexes

Contents:

depth_first_traversal()

A lazy depth first traversal

depth_first_search()

A depth first search

iterative_deepening_depth_first_search()

Searching infinite graphs

a_star()

Fast optimal pathfinding

topological_sort()

Dependency resolution.

strongly_connected_components()

Determines which areas of the graph can reach which other areas.

In the future I would like to implement more algorithms: - Minimum Spanning Tree - Min-cut/Max-flow - Substructure Search

Installation note: This package optionally uses numpy. Numpy is used by some unit tests. Numpy is used to calculate A-stars effective branching factor (EBF). If numpy is not available then EBF is not reported.

Comments and feedback are welcome Send to David McDougall email: dam1784[at]rit.edu

Keywords: development,graph Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Intended Audience :: Developers Classifier: Topic :: Software Development Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Utilities Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Provides-Extra: debug Provides-Extra: test

Metadata

Release files for graph-algorithms 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for graph-algorithms 0.1.1
File Interpreter ABI Platform
graph_algorithms-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / graph_algorithms-0.1.1-py3-none-any.whl

Download URL graph_algorithms-0.1.1-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76fa77f3c5c76746ef079b758b3f12e62c229d76a595a0b7ef4b1ce22c5627d5
BLAKE2b-256 checksum
How to use checksums
2c1f40c481e43cfa15c708015ed6cb518033a16a7d0ddd81a59d1ec26ba9ce49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page