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.
| Modifier and Type | Field and Description |
|---|---|
protected double |
my_p |
protected static Logarithmic |
shared |
randomGeneratorserialVersionUID| 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.
|
String |
toString()
Returns a String representation of the receiver.
|
apply, apply, clone, getRandomGenerator, makeDefaultGenerator, nextInt, setRandomGeneratorprotected double my_p
protected static Logarithmic shared
public Logarithmic(double p,
RandomEngine randomGenerator)
public double nextDouble()
nextDouble in class AbstractDistributionpublic double nextDouble(double a)
public void setState(double p)
public static double staticNextDouble(double p)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.