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.
|
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, wait
sample
public BernoulliCellSampler(double lb, double ub, boolean complement)
public void setSeed(long seed)
Pseudorandom
setSeed
in interface Pseudorandom
public int sample()
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