Skip to main content

Latin Squares and Related Designs.

Project description

Created Wed Aug 8 15:39:10 BST 2012. Last updated Fri Sep 13 16:38:28 BST 2013.

Introduction

Ryser is a Python package for latin squares and related designs.

An Example

Here is a demo which computes Hall numbers and draws subgraphs.

>>> from ryser.examples import eg3, fail4
>>> from ryser.hall import hall_inequality_on_cells
>>> from ryser.hall import symmetric_hall_inequality_on_cells
>>> S = fail4[0]
>>> assert hall_inequality_on_cells(eg3, S)
>>> assert not symmetric_hall_inequality_on_cells(eg3, S)
>>> from ryser.hall import symmetric_hall_numbers, hall_subgraphs
>>> hall_nums = symmetric_hall_numbers(eg3, S)
>>> print "S: " + str(S)
>>> print "Hall numbers: "  + str(hall_nums)
>>> print "Sum of Hall numbers: " + str(sum(hall_nums))
>>> print "No of vertices: " + str(len(S))
>>> hall_subgraphs(eg3, S, format = 'dot')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ryser-0.0.7.tar.gz (32.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page