Skip to main content

Fast Boltzmann random generators for SageMath

Project description

Usain Boltz

Usain Boltz is a Python/Cython library meant to automate the random generation of tree-like structures.

The library was primarily designed to be used with the Sagemath mathematics software system but Sagemath is no longer a dependency and the library is now perfectly usable both within and without a Sagemath environment.


Via pip (recommended)

Usain Boltz is available on PyPI, just type:

pip3 install usainboltz

From source

System requirements:

  • One of our dependencies requires cmake to build. It is installed by default on most distributions but if you encounter build errors with osqp that may be the reason.

  • You also need to have cython installed on your system to be able to build Usain Boltz.

Build, test and install:

  • Run make build to build the C and Cython extensions
  • Run make test to run the doctests
  • Run python3 install [--user] to install in your current python environment


Both installation methods make Usain Boltz available to Sagemath


Provided you have sphinx installed, you can build the documentation with make doc.

Examples and demo

Some examples are available in the examples and sage_examples modules in the documentation. In particular, the sage_examples module illustrates how Usain Boltz can be used to generate sage objects.

A sage notebook is available in the demo/ folder which shows how Usain Boltz can be used to generate various objects related to binary trees from the same grammar and generator.

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

usainboltz-0.2.1.tar.gz (52.2 kB view hashes)

Uploaded source

Built Distributions

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