RandomSelectors
Contains ResultSelector's to be used with a java.util.stream.Stream as a collection operation.
Functions
Link copied to clipboard
Creates a result selector that randomly selects an element where the element index is selected with the formula: where randomSd generates a random number from a normal distribution with the parameters min/max/mean/sd
var resultIndex = randomSd(0, list.size() - 1, 0, sdPercent * list.size())
Content copied to clipboard
Creates a result selector that randomly selects an element where the element index is selected with the formula: where randomSd generates a random number from a normal distribution with the parameters min/max/mean/sd
var resultIndex = randomSd(0, list.size() - 1, meanPercent * (list.size() - 1), sdPercent * list.size())
Content copied to clipboard
Link copied to clipboard
Creates a result selector that randomly selects an element using a uniform distribution
Link copied to clipboard
Creates a result selector that randomly selects an element where each element is given a specific weight based on the weight extractor function.