Class WeightedSelectorImmutable<T>

java.lang.Object
org.aksw.commons.collections.selector.WeightedSelectorImmutable<T>
Type Parameters:
T -
All Implemented Interfaces:
Cloneable, WeightedSelector<T>

public class WeightedSelectorImmutable<T> extends Object implements WeightedSelector<T>
Immutable selector over an immutable collection of (item, weight) pairs. Weights are internally treated as doubles, however, any subclass of Number may be used in the pair itself. Access complexity is O(Log(n)) Similar to EnumeratedDistribution from commons math
Author:
Claus Stadler, Oct 12, 2018