public class CauchyDistribution extends Object implements DistributionWithRandom
Modifier and Type | Field and Description |
---|---|
(package private) double |
location
The location (x0) parameter.
|
private Random |
random
The random generator.
|
(package private) double |
shape
The shape (gamma) parameter.
|
Constructor and Description |
---|
CauchyDistribution(double location,
double shape)
Constructor with default random.
|
CauchyDistribution(double location,
double shape,
Random random)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double x)
Return the cumulative density function at the given value.
|
static double |
cdf(double x,
double location,
double shape)
PDF function, static version.
|
double |
nextRandom()
Generate a new random value
|
double |
pdf(double x)
Return the density of an existing value
|
static double |
pdf(double x,
double location,
double shape)
PDF function, static version.
|
double |
quantile(double x)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
static double |
quantile(double x,
double location,
double shape)
PDF function, static version.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
final double location
final double shape
private Random random
public CauchyDistribution(double location, double shape)
location
- Location (x0)shape
- Shape (gamma)public CauchyDistribution(double location, double shape, Random random)
location
- Location (x0)shape
- Shape (gamma)random
- Random generatorpublic double pdf(double x)
Distribution
pdf
in interface Distribution
x
- existing valuepublic double cdf(double x)
Distribution
cdf
in interface Distribution
x
- existing valuepublic double quantile(double x)
Distribution
quantile
in interface Distribution
x
- Quantile to findpublic double nextRandom()
DistributionWithRandom
nextRandom
in interface DistributionWithRandom
public static double pdf(double x, double location, double shape)
x
- Valuelocation
- Location (x0)shape
- Shape (gamma)public static double cdf(double x, double location, double shape)
x
- Valuelocation
- Location (x0)shape
- Shape (gamma)public static double quantile(double x, double location, double shape)
x
- Valuelocation
- Location (x0)shape
- Shape (gamma)