Skip to content

sagemath/sage-combinat-widgets

Repository files navigation

Sage Combinat Widgets

image

Jupyter editable widgets for Sagemath combinatorial objects:

  • Partition & Skew Partition
  • Standard/Semi-standard/Generic Tableau & Skew Tableau
  • Parallelogram Polyomino

Also :

  • Matrices
  • grid-representable Graphs

Installation

Assuming your pip install on Python3:

$ pip install sage_combinat_widgets

Local install from source

Download the source from the git repository:

$ git clone https://github.com/sagemath/sage-combinat-widgets.git

Change to the root directory and run:

$ sage -pip install --upgrade --no-index -v .

NB: For this to work, you need a recent nodejs installation.

For use on Jupyterlab, you might also need to install `@jupyter-widgets/jupyterlab-manager`:

$ jupyter labextension @jupyter-widgets/jupyterlab-manager

Usage

Once the package is installed, you can use it in Sage Jupyter Notebook.

from sage_combinat_widgets import GridViewWidget

S = StandardTableaux(15).random_element()

w = TableauWidget(t)

w

See the demo notebook.

Tests

Once the package is installed, one can use the SageMath test system configured in setup.py to run the tests:

$ sage setup.py test

This is just calling sage -t with appropriate flags.

Shorthand:

$ make test

If you have tox installed, you can also test the package like this:

$ tox

Documentation

The documentation of the package can be generated using Sage's Sphinx installation:

$ cd docs
$ sage -sh -c "make html"

Shorthand:

$ make doc

Acknowledgments

  • EU logo This package was created under funding of the Horizon 2020 European Research Infrastructure project OpenDreamKit (grant agreement #676541).

About

A collection of Jupyter widgets for combinatorial objects in SageMath

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published