public final class CauchyGenerator extends java.lang.Object implements DoubleSymmetricGenerator
An implementation of DoubleSymmetricGenerator
which generates values on the base of a Cauchy distribution.
Modifier and Type | Field and Description |
---|---|
private static double |
DEFAULT_LOCATION |
private static double |
DEFAULT_SCALE |
private NormalizedDoubleRandomGenerator |
rand |
Constructor and Description |
---|
CauchyGenerator(NormalizedDoubleRandomGenerator rand) |
Modifier and Type | Method and Description |
---|---|
double |
lowerDouble()
Specifies the lower bound of the values that can be returned by
nextDouble() . |
double |
nextDouble()
Returns a random double value arbitrarily distributed in the range
[lowerDouble(), upperDouble()] . |
double |
nextDouble(double location,
double scale)
Returns a random double value arbitrarily distributed in the range
[lowerDouble(), upperDouble()] , accordingly to the provided parameters. |
double |
upperDouble()
Specifies the upper bound of the values that can be returned by
nextDouble() . |
private static final double DEFAULT_LOCATION
private static final double DEFAULT_SCALE
private final NormalizedDoubleRandomGenerator rand
public CauchyGenerator(NormalizedDoubleRandomGenerator rand)
public double nextDouble()
DoubleRandomGenerator
Returns a random double value arbitrarily distributed in the range [lowerDouble(), upperDouble()]
.
nextDouble
in interface DoubleRandomGenerator
public double nextDouble(double location, double scale)
DoubleSymmetricGenerator
Returns a random double value arbitrarily distributed in the range [lowerDouble(), upperDouble()]
, accordingly to the provided parameters.
nextDouble
in interface DoubleSymmetricGenerator
location
- The location of the distribution.scale
- The scale of the distributionpublic double lowerDouble()
DoubleRandomGenerator
Specifies the lower bound of the values that can be returned by nextDouble()
.
lowerDouble
in interface DoubleRandomGenerator
public double upperDouble()
DoubleRandomGenerator
Specifies the upper bound of the values that can be returned by nextDouble()
.
upperDouble
in interface DoubleRandomGenerator