Class EnumeratedTreeDistribution<T>
- java.lang.Object
-
- org.apache.commons.math3.distribution.EnumeratedDistribution
-
- org.apache.druid.segment.generator.EnumeratedTreeDistribution<T>
-
- All Implemented Interfaces:
Serializable
public class EnumeratedTreeDistribution<T> extends org.apache.commons.math3.distribution.EnumeratedDistribution
EnumeratedDistrubtion's sample() method does a linear scan through the array of probabilities. This is too slow with high cardinality value sets, so this subclass overrides sample() to use a TreeMap instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnumeratedTreeDistribution(List<org.apache.commons.math3.util.Pair<T,Double>> pmf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
sample()
-