public class BernoulliSampler<T> extends java.lang.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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsamplepublic BernoulliSampler(double fraction,
                scala.reflect.ClassTag<T> evidence$1)
public void setSeed(long seed)
PseudorandomsetSeed in interface Pseudorandompublic int sample()
RandomSamplersample in interface RandomSampler<T,T>public BernoulliSampler<T> clone()
RandomSamplerclone in interface RandomSampler<T,T>clone in class java.lang.Object