public class Logarithmic extends AbstractContinousDoubleDistribution
Valid parameter ranges: 0 < p < 1.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Implementation:
A.W. Kemp (1981): Efficient generation of logarithmically distributed pseudo-random variables, Appl. Statist. 30, 249-253.
| Constructor and Description |
|---|
Logarithmic(double p,
DoubleRandomEngine randomGenerator)
Constructs a Logarithmic distribution.
|
| Modifier and Type | Method and Description |
|---|---|
double |
nextDouble()
Returns a random number from the distribution.
|
double |
nextDouble(double a)
Returns a random number from the distribution; bypasses the internal
state.
|
void |
setState(double p)
Sets the distribution parameter.
|
static double |
staticNextDouble(double p)
Returns a random number from the distribution.
|
String |
toString()
Returns a String representation of the receiver.
|
apply, apply, clone, makeDefaultGenerator, nextIntpublic Logarithmic(double p,
DoubleRandomEngine randomGenerator)
public double nextDouble()
nextDouble in class AbstractDoubleDistributionpublic double nextDouble(double a)
public void setState(double p)
public static double staticNextDouble(double p)
Jump to the Parallel Colt Homepage