Skip to content
forked from coin-or/GiMPy

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

License

Notifications You must be signed in to change notification settings

garretvo19/GiMPy

 
 

Repository files navigation

GiMPy 1.3

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://tkralphs.github.io/GiMPy

Installation:

easy_install coinor.gimpy

##Installation Notes

In order for GiMPy to visualize the graphs it produces, it's necessary to install GraphViz 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.

##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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 46.8%
  • Shell 42.4%
  • Makefile 9.9%
  • Other 0.9%