GithubHelp home page GithubHelp logo

fagan2888 / gimpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coin-or/gimpy

0.0 0.0 0.0 4.97 MB

A graph library containing pure Python implementations of a variety of graph algorithms

License: Eclipse Public License 1.0

Python 47.25% TeX 0.07% Shell 42.03% Makefile 9.80% M4 0.84%

gimpy's Introduction

GiMPy 2.0

Now with Python3 Support!

DOI

Graph Methods in Python (GiMPy) is a Python graph library containing pure Python implementations of a variety of graph algorithms. The goal is clarity in implementation rather than eficiency. Most methods have an accompanying visualization and are thus appropriate for use in the classroom.

Documentation for the API is here:

https://coin-or.github.io/GiMPy

Pypi download page is here:

https://pypi.python.org/pypi/coinor.gimpy

Installation Notes

To install, do

pip install coinor.gimpy

##Installation Notes

In order for GiMPy to visualize the graphs it produces, it's necessary to install GraphViz (Important: after installing graphviz, you must add the graphviz bin directory, usually C:\Program Files (x86)\Graphviz2.38\bin, to your PATH) and choose one of these additional methods for display:

  • Recommended: xdot along with PyGtk and call set_display_mode('xdot')
  • Python Imaging Library and call set_display_mode('PIL')
  • Pygame and call set_display_mode('pygame')
  • Call set_display_mode('file') to just write files to disk that have to then be opened manually.

It is also possible to typeset labels in LaTex and to output the graph in LaTex format using dot2tex. After installing dot2tex, this can be done by simply calling the method write(basename='fileName', format='dot'), and then doing dot2tex --tmath fileName.dot or by calling set_display_mode('dot2tex') and then display() as usual. At the moment, the latter only seems to work with version 2.9.0dev available here. For the former method, just using easy_install dot2tex should work fine.

Additional Notes for Windows Users

On Windows, if you want to use xdot, there are some additional particulars.

  • You must install the 32-bit version of Python 2.7
  • You must install the PyGtk version 2.22.6. Version 2.24 is buggy on Windows.
  • You must install version 0.6 of xdot with e.g., pip install xdot==0.6

Additional Notes for Linux and OS X Users

There have been reports of incompatibilities with recent versions of PyGtk, but I have not attempted yet to track this down. If things break, you may try some variant of the instructions above for installing on Windows.

##Examples

###Forestry Model Forestry ###Display Window in XDot XDot ###Lehigh ISE Prerequisite Graph ISE Prerequisites ###Graph of Actors Starring Together in Movies in IMDB Bacon ###Branch and Bound Tree Branch and Bound ###SAT Game Tree SAT ###Flow Problem Max Flow

gimpy's People

Contributors

aykutbulut avatar svigerske avatar tkralphs 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.