cern.jet.random
public class Logarithmic extends AbstractContinousDistribution
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.
serialVersionUID
Constructor and Description |
---|
Logarithmic(double p,
RandomEngine 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.
|
java.lang.String |
toString()
Returns a String representation of the receiver.
|
apply, apply, clone, makeDefaultGenerator, nextInt
public Logarithmic(double p, RandomEngine randomGenerator)
public double nextDouble()
nextDouble
in class AbstractDistribution
public double nextDouble(double a)
public void setState(double p)
public static double staticNextDouble(double p)
public java.lang.String toString()
toString
in class java.lang.Object
Jump to the Colt Homepage