Giter Club home page Giter Club logo

graph_algorithms's Introduction

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

graph_algorithms's People

Contributors

ctrl-z-9000-times avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.