RandomComposition(Integer n, Integer k)

Samples a random k-tuple of positive integers that sum to n.

Parameters

  • Integer n - the sum of the random tuple.
  • Integer k - the size of the random tuple.

Return type

Integer[]

Examples

  • skylineCoalescent.lphy
  • https://linguaphylo.github.io/tutorials/skyline-plots/