From b7a3244f4bf3d8ba382b59235932b39cffc49927 Mon Sep 17 00:00:00 2001 From: Fabian Ball Date: Mon, 18 Dec 2017 15:37:26 +0100 Subject: [PATCH] Updated doc and readme --- README.rst | 34 ++++++++++++++- doc/source/conf.py | 4 +- doc/source/examples.rst | 4 -- pysaucy/examples.py | 95 +++++++++++++++++++++++------------------ 4 files changed, 88 insertions(+), 49 deletions(-) diff --git a/README.rst b/README.rst index c84fd21..2f3f563 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,37 @@ pysaucy ======= A Python binding for the saucy algorithm for the graph automorphism problem -To install run ``python setup.py install`` and ensure the source code of -`Saucy `_ is found in the +To install, run ``python setup.py install`` and ensure the source code of +`Saucy `_ is found in the path ``./saucy``. The source code is available from the authors on request. + +Changes +------- +0.3.1 + - Faster orbit partition + - Karate graph used for test + +0.3 + - Removed the use of global static variables + +0.2.2 + - Added support for initially colored partition + +0.2.1 + - Added more tests + - Added doc strings + - Added Sphinx documentation support + +0.2 + - Removed old debug stuff + - Added code comments + - Added computation and return of the orbit partition + - Many small fixes + +0.1.1 + - Fix of a severe bug where not enough memory was allocated + - Small fixes + +0.1 + - First version diff --git a/doc/source/conf.py b/doc/source/conf.py index 2ec17c9..d15139e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -59,9 +59,9 @@ # built documents. # # The short X.Y version. -version = u'0.2.1' +version = u'0.3.1' # The full version, including alpha/beta/rc tags. -release = u'0.2.1b' +release = u'0.3.1b' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/examples.rst b/doc/source/examples.rst index 91367bd..c3f74b9 100644 --- a/doc/source/examples.rst +++ b/doc/source/examples.rst @@ -5,11 +5,7 @@ pysaucy.examples Module contents --------------- -.. autodata:: pysaucy.examples - :annotation: - .. automodule:: pysaucy.examples :members: :undoc-members: :show-inheritance: - diff --git a/pysaucy/examples.py b/pysaucy/examples.py index dd5208e..3e82991 100644 --- a/pysaucy/examples.py +++ b/pysaucy/examples.py @@ -1,4 +1,5 @@ """ +Some example graphs or graph generators. .. moduleauthor:: Fabian Ball """ @@ -6,47 +7,59 @@ from .graph import Graph -#: The butterfly graph which consists of 5 nodes and 6 edges: -#: Two complete graphs with 3 nodes are merged by sharing -#: one of the nodes each. -butterfly = Graph([[1, 2], [2], [3, 4], [4], []]) - -#: The Zachary karate network (n=34, m=78) with |Aut(G)| = 480 -karate = Graph([ - [31, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 17, 19, 21], - [2, 3, 7, 13, 17, 19, 21, 30], - [3, 32, 7, 8, 9, 13, 27, 28], - [7, 12, 13], - [10, 6], - [6, 10, 16], - [16], - [], - [30, 33, 32], - [33], - [], - [], - [], - [33], - [32, 33], - [32, 33], - [], - [], - [32, 33], - [33], - [32, 33], - [], - [32, 33], - [32, 25, 27, 33, 29], - [31, 25, 27], - [31], - [33, 29], - [33], - [31, 33], - [32, 33], - [33, 32], - [32, 33], - [33], - []]) + +def butterfly(): + """ + The butterfly graph which consists of 5 nodes and 6 edges: + Two complete graphs with 3 nodes are merged by sharing + one of the nodes each. + + :return: Butterfly graph + """ + return Graph([[1, 2], [2], [3, 4], [4], []]) + + +def karate(): + """ + The Zachary karate network (n=34, m=78) with :math:`\left|Aut(G)\\right| = 480` + + :return: Karate graph + """ + return Graph([ + [31, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 17, 19, 21], + [2, 3, 7, 13, 17, 19, 21, 30], + [3, 32, 7, 8, 9, 13, 27, 28], + [7, 12, 13], + [10, 6], + [6, 10, 16], + [16], + [], + [30, 33, 32], + [33], + [], + [], + [], + [33], + [32, 33], + [32, 33], + [], + [], + [32, 33], + [33], + [32, 33], + [], + [32, 33], + [32, 25, 27, 33, 29], + [31, 25, 27], + [31], + [33, 29], + [33], + [31, 33], + [32, 33], + [33, 32], + [32, 33], + [33], + []]) def complete(n):