public class ChengBetaSampler extends SamplerBase implements ContinuousSampler
R. C. H. Cheng, "Generating beta variates with nonintegral shape parameters", Communications of the ACM, 21, 317-322, 1978.
| Constructor and Description |
|---|
ChengBetaSampler(UniformRandomProvider rng,
double alpha,
double beta)
Creates a sampler instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
sample()
Creates a sample.
|
String |
toString() |
nextDouble, nextInt, nextIntpublic ChengBetaSampler(UniformRandomProvider rng, double alpha, double beta)
rng - Generator of uniformly distributed random numbers.alpha - Distribution first shape parameter.beta - Distribution second shape parameter.public double sample()
sample in interface ContinuousSamplerpublic String toString()
toString in class SamplerBaseCopyright © 2016 The Apache Software Foundation. All rights reserved.