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.

Install

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 setup.py install [--user] to install in your current python environment

Sagemath

Both installation methods make Usain Boltz available to Sagemath

Documentation

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 Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page