Skip to main content

uniform_quota_split

Function uniform_quota_split 

Source
pub fn uniform_quota_split(
    total_partitions: usize,
    member_count: usize,
) -> UniformQuotaSplit
Expand description

Split total_partitions over member_count members, as UniformHomogeneousAssignmentBuilder.build does.

The contract is the Euclidean division property, which names the floor and the remainder uniquely: the quotas add up to the total, and fewer members than there are members get the extra partition.