public class BernoulliCellSampler<T> extends java.lang.Object implements RandomSampler<T,T>
param: lb lower bound of the acceptance range param: ub upper bound of the acceptance range param: complement whether to use the complement of the range specified, default to false
Constructor and Description |
---|
BernoulliCellSampler(double lb,
double ub,
boolean complement) |
Modifier and Type | Method and Description |
---|---|
BernoulliCellSampler<T> |
clone()
return a copy of the RandomSampler object
|
BernoulliCellSampler<T> |
cloneComplement()
Return a sampler that 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 BernoulliCellSampler(double lb, double ub, boolean complement)
public void setSeed(long seed)
Pseudorandom
setSeed
in interface Pseudorandom
public scala.collection.Iterator<T> sample(scala.collection.Iterator<T> items)
RandomSampler
sample
in interface RandomSampler<T,T>
public BernoulliCellSampler<T> cloneComplement()
public BernoulliCellSampler<T> clone()
RandomSampler
clone
in interface RandomSampler<T,T>
clone
in class java.lang.Object