Generates random positive values that sum to 1 by sampling from a Dirichlet distribution with all concentration parameters equal to 1, i.e. Dirichlet(1, ..., 1). This corresponds to a uniform distribution over the simplex.
Details
Optionally, the result can be rounded to a specified number of digits while preserving the total sum of 1.
Values are generated via normalized Gamma draws: $$x_i = g_i / \sum_j g_j, \quad g_i \sim \Gamma(1, 1)$$
If digits is specified, rounding may introduce small numerical
deviations. These are corrected by adjusting the largest component,
which minimizes relative distortion and avoids negative values.
