IntegerPartitioner2D
Provides a tree-based approach to obtain the different integer partitions possible when n balls are divided into different numbers of boxes
partition_data: dict
@classmethod
get_partitions(cls, boxes, balls):
LLM Docstring
Enumerate all ways to distribute balls into boxes (a 2-D integer partition /
contingency-table enumeration), sorting both descending and undoing the sort on
the result.
boxes:np.ndarraythe box capacities
balls:np.ndarraythe ball counts
:returns:np.ndarraythe enumerated distributions