implementation of accel_asc algorithm for integer partitions
Project description
accelasc
Implementation of the accel_asc
algorithm for integer partitions. See
this stackoverflow post
and Jerome Kelleher's website.
See also the paper by Kelleher and O'Sullivan: Generating All Partitions: A Comparison Of Two Encodings.
Installation
pip3 install accelasc
or
pip3 install --user accelasc
Usage
from accelasc import accel_asc
tuple(accel_asc(5))
([1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [1, 4], [2, 3], [5])
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
accelasc-1.0.4.tar.gz
(2.5 kB
view hashes)