scaledSd

static ResultSelector<TscaledSd<T>(double sdPercent)

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 {@code list.size() * sdPercent} as the actual sd parameter)

<T>

the result type

static ResultSelector<TscaledSd<T>(double meanPercent, double sdPercent)

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 {@code (list.size() - 1) * sdPercent} as the actual sd parameter)

sdPercent

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

<T>

the result type