Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

libsemigroups/libsemigroups-python-bindings

Repository files navigation

Python bindings for libsemigroups

This is a basic package providing python bindings for the libsemigroups C++ library.

libsemigroups is a C++ library for semigroups and monoids; it is partly based on Algorithms for computing finite semigroups, Expository Slides, and Semigroupe 2.01 Jean-Eric Pin.

Basic instructions

Installing with conda

This installation method assumes that you have anaconda or miniconda installed. See the getting started and miniconda download page on the conda website.

Activate the conda-forge package repository:

conda config --add channels conda-forge

Install the Python bindings:

conda install libsemigroups-python-bindings

From the source

Install some dependencies:

sudo -H pip install cython cysignals --upgrade

Install the libsemigroups C++ library, e.g. from sources:

git clone https://github.com/james-d-mitchell/libsemigroups
cd libsemigroups
./autogen.sh ; ./configure ; make ; sudo make install
cd ..

Install the python bindings:

git clone https://github.com/james-d-mitchell/libsemigroups-python-bindings
cd libsemigroups-python-bindings
pip install --user . --upgrade
cd ..

Try it out:

python

>>> from semigroups import Semigroup, Transformation
>>> S = Semigroup(Transformation([1, 1, 4, 5, 4, 5]),
...               Transformation([2, 3, 2, 3, 5, 5]))
>>> S.size()
5
>>> quit()

Issues

If you find any problems with libsemigroups-python-bindings or have any suggestions for features that you'd like to see please use the issue tracker.

Documentation

The documentation is generated using Sphinx and is available here.