T - item typepublic class BernoulliSampler<T> extends Object implements RandomSampler<T,T>
param: fraction the sampling fraction, aka Bernoulli sampling probability
| Constructor and Description | 
|---|
| BernoulliSampler(double fraction,
                scala.reflect.ClassTag<T> evidence$1) | 
| Modifier and Type | Method and Description | 
|---|---|
| BernoulliSampler<T> | clone()return a copy of the RandomSampler object | 
| int | sample()Whether to sample the next item or not. | 
| void | setSeed(long seed)Set random seed. | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsamplepublic BernoulliSampler(double fraction,
                        scala.reflect.ClassTag<T> evidence$1)
public BernoulliSampler<T> clone()
RandomSamplerclone in interface RandomSampler<T,T>clone in class Objectpublic int sample()
RandomSamplersample in interface RandomSampler<T,T>public void setSeed(long seed)
PseudorandomsetSeed in interface Pseudorandom