T - The type of sample.@Internal public class PoissonSampler<T> extends RandomSampler<T>
emptyIterable, EPSILON| Constructor and Description | 
|---|
| PoissonSampler(double fraction)Create a poisson sampler which can sample elements with replacement. | 
| PoissonSampler(double fraction,
              long seed)Create a poisson sampler which can sample elements with replacement. | 
| Modifier and Type | Method and Description | 
|---|---|
| Iterator<T> | sample(Iterator<T> input)Sample the input elements, for each input element, generate its count following a poisson
 distribution. | 
public PoissonSampler(double fraction,
                      long seed)
fraction - The expected count of each element.seed - Random number generator seed for internal PoissonDistribution.public PoissonSampler(double fraction)
fraction - The expected count of each element.public Iterator<T> sample(Iterator<T> input)
sample in class RandomSampler<T>input - Elements to be sampled.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.