public class Zeta extends AbstractDiscreteDistribution
Valid parameter ranges: ro > 0 and pk >= 0.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Implementation:
J. Dagpunar (1988): Principles of Random Variate Generation, Clarendon Press, Oxford.
Modifier and Type | Field and Description |
---|---|
protected double |
c |
protected double |
d |
protected double |
maxlongint |
protected double |
pk |
protected double |
pk_prev |
protected double |
ro |
protected double |
ro_prev |
randomGenerator
Constructor and Description |
---|
Zeta(double ro,
double pk,
MersenneTwisterFast randomGenerator)
Constructs a Zeta distribution.
|
Modifier and Type | Method and Description |
---|---|
protected long |
generateZeta(double ro,
double pk,
MersenneTwisterFast randomGenerator)
Returns a zeta distributed random number.
|
int |
nextInt()
Returns a random number from the distribution.
|
void |
setState(double ro,
double pk)
Sets the parameters.
|
java.lang.String |
toString()
Returns a String representation of the receiver.
|
nextDouble
apply, apply, getRandomGenerator, setRandomGenerator
protected double ro
protected double pk
protected double c
protected double d
protected double ro_prev
protected double pk_prev
protected double maxlongint
public Zeta(double ro, double pk, MersenneTwisterFast randomGenerator)
protected long generateZeta(double ro, double pk, MersenneTwisterFast randomGenerator)
public int nextInt()
nextInt
in class AbstractDiscreteDistribution
public void setState(double ro, double pk)
public java.lang.String toString()
toString
in class java.lang.Object