Package-level declarations

Types

Link copied to clipboard
data class RandomWeights<T>(val weightsMap: Map<T, Double>)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun Random.get(rectangle: Rectangle): Point
operator fun <T> Random.get(list: List<T>): T
operator fun Random.get(range: IntRange): Int
operator fun Random.get(range: LongRange): Long
operator fun <T : Interpolable<T>> Random.get(l: T, r: T): T
operator fun Random.get(l: Angle, r: Angle): Angle
operator fun Random.get(min: Ratio, max: Ratio): Ratio
operator fun Random.get(min: Double, max: Double): Double
operator fun Random.get(min: Float, max: Float): Float
operator fun Random.get(min: Int, max: Int): Int
Link copied to clipboard
fun Random.ints(from: Int, until: Int): Sequence<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> List<T>.random(random: Random = Random): T
Link copied to clipboard
fun <T> List<T>.randomWithWeights(weights: List<Double>, random: Random = Random): T
Link copied to clipboard
fun <T : MutableInterpolable<T>> T.setToRandom(min: T, max: T, random: Random = Random)
Link copied to clipboard
fun <T> Random.shuffledWeighted(weights: Map<T, Double>): List<T>
fun <T> Random.shuffledWeighted(values: List<T>, weights: List<Double>): List<T>
Link copied to clipboard
fun <T> Random.weighted(weights: RandomWeights<T>): T
fun <T> Random.weighted(weights: Map<T, Double>): T