scaledSd

open fun <T> scaledSd(sdPercent: Double): ResultSelector<T>

Creates a result selector that randomly selects an element where the element index is selected with the formula:

var resultIndex = randomSd(0, list.size() - 1, 0, sdPercent * list.size())
where randomSd generates a random number from a normal distribution with the parameters min/max/mean/sd

Return

a result selector that randomly selects based on a normal distribution

Parameters

sdPercent

the scaled sd value to use when selecting an element (will use list.size() * sdPercent as the actual sd parameter)

<T>

the result type


open fun <T> scaledSd(meanPercent: Double, sdPercent: Double): ResultSelector<T>

Creates a result selector that randomly selects an element where the element index is selected with the formula:

var resultIndex = randomSd(0, list.size() - 1, meanPercent * (list.size() - 1), sdPercent * list.size())
where randomSd generates a random number from a normal distribution with the parameters min/max/mean/sd

Return

a result selector that randomly selects based on a normal distribution

Parameters

meanPercent

the scaled sd value to use when selecting an element (will use (list.size() - 1) * sdPercent as the actual sd parameter)

sdPercent

the scaled sd value to use when selecting an element (will use list.size() * sdPercent as the actual sd parameter)

<T>

the result type