public class BernoulliSampler<T> extends Object implements RandomSampler<T,T>
| Constructor and Description |
|---|
BernoulliSampler(double lb,
double ub,
boolean complement,
java.util.Random random) |
BernoulliSampler(double ratio,
java.util.Random random) |
| Modifier and Type | Method and Description |
|---|---|
BernoulliSampler<T> |
clone() |
BernoulliSampler<T> |
cloneComplement()
Return a sampler with is the complement of the range specified of the current sampler.
|
scala.collection.Iterator<T> |
sample(scala.collection.Iterator<T> items)
take a random sample
|
void |
setSeed(long seed)
Set random seed.
|
public BernoulliSampler(double lb,
double ub,
boolean complement,
java.util.Random random)
public BernoulliSampler(double ratio,
java.util.Random random)
public void setSeed(long seed)
PseudorandomsetSeed in interface Pseudorandompublic scala.collection.Iterator<T> sample(scala.collection.Iterator<T> items)
RandomSamplersample in interface RandomSampler<T,T>public BernoulliSampler<T> cloneComplement()
public BernoulliSampler<T> clone()
clone in interface RandomSampler<T,T>clone in class Object