T - The type of sample.public class PoissonSampler<T> extends RandomSampler<T>
EMPTY_ITERABLE, 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.
|
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–2016 The Apache Software Foundation. All rights reserved.