WeightedSortedList
constructor(defaultCapacity: Int = 0, lowerBound: Double = Double.NEGATIVE_INFINITY, lowerBoundInclusive: Boolean = true, upperBound: Double = Double.POSITIVE_INFINITY, upperBoundInclusive: Boolean = true, weighter: ToDoubleFunction<in E>)
Convenience constructor that creates empty internal storage with the given default capacity.
Parameters
defaultCapacity
initial capacity used to allocate internal arrays (may be 0).
lowerBound
lower bound for allowed weights.
lowerBoundInclusive
whether the lower bound is inclusive.
upperBound
upper bound for allowed weights.
upperBoundInclusive
whether the upper bound is inclusive.
weighter
function mapping an element to its weight.
The same invariants on bounds and ordering apply as for the primary constructor.