GithubHelp home page GithubHelp logo

pombredanne / jurij Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrejbauer/jurij

0.0 1.0 0.0 148 KB

A simple Python application for drawing graphs, useful for teaching and experiments.

License: BSD 2-Clause "Simplified" License

Python 100.00%

jurij's Introduction

Jurij

A simple Python application for drawing graphs, useful for teaching and experiments.

To run the program, start gui.py from command line or the Python IDLE interface.

The program files are as follows:

  • jurij.py is the main program which just starts the application
  • jurij/__init__.py just imports everything else in jurij
  • jurij/graph.py the graph data structure and basic operations
  • jurij/group.py finitely-generated groups (used for Cayley graphs)
  • jurij/library.py basic graphs
  • jurij/view.py a simple graph viewer with a spring embedder

How to use the graph viewer

To draw a graph, enter its Python definition in the input field and press the Draw! button. Examples of definitions:

  • cycle(5)
  • path(30)
  • complete_graph(7)
  • cone(cycle(10))
  • product(path(3), cycle(4))
  • igraph(5,2,1)
  • cayley_graph(symmetric_group(4))
  • cayley_graph(Group([1,2], operation=(lambda x,y: (x+y)%13)))
  • cayley_graph(permutation_group([(1,0,2,3), (0,3,1,2)]))

You can also enter a specific graph by giving a list of edges or an adjancency dictionary, for example:

  [(1,2), (2,3), (2,4), (3,4)]

or

  {1 : [2], 2 : [3,4], 3 : [4], 4 : []}

For further information on what is available see the modules jurij.graph, jurij.group and jurij.library.

jurij's People

Contributors

andrejbauer avatar

Watchers

 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.