uniformSimplex
fun <T : LinearType<T>> List<T>.uniformSimplex(random: Random = Random.Default, biasOrder: Int = 0, biasAmount: Double = 0.0): T(source)
Generates a random value within the convex hull of the elements in the list using a uniform distribution over the simplex formed by the elements, optionally applying bias to the distribution.
Return
A value of type T
representing the weighted interpolation of the list elements, with weights sampled uniformly or with bias adjustments if specified.
Parameters
random
The random number generator used to produce random values. Defaults to Random.Default
.
biasOrder
The number of iterations to apply bias adjustments to the weights. Defaults to 0.
biasAmount
The magnitude of the bias adjustment applied during each iteration. Defaults to 0.0.