distribute: Partition a number following a given distribution¶
maelzel.distribute Module¶
distribute¶
This module provides functionality to partition a number in multiple ways, (partitionFib, partitionExpon) or to subdivide it following a given distribution or curve.
Since many functions make use of curves, we rely heavily on the package bpf4, which allows to define and compute break-point-functions
Functions¶
|
Reconstruct the given sequence with items from possibleValues |
|
Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. |
|
Sample curve applying dithering to smooth transitions |
|
Perform a D'Ohndt distribution |
|
interleave the elements of A and B |
|
Interleave items of multiple streams based on dynamic weights |
|
Represents x as a seq. |
|
Partition a number x into numpart partitions following a curve |
|
Partition n into numpart following an exponential curve |
|
Partition n into numpart partitions with fibonacci proportions |
|
Partition n following curve |
|
Partition x in numparts parts following curve |
|
Plot a seq. |
|
Generates a list of 0s/1s of length n, following the curve |
|
Round sequence preserving its integer sum |