public class CircleDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
CircleDistribution()
This default constructor creates a new circle distribution with radius 1.
|
CircleDistribution(double r)
This general constructor creates a new circle distribution with a specified radius.
|
Modifier and Type | Method and Description |
---|---|
double |
getCDF(double x)
This method compute the cumulative distribution functionin in terms of
the radius parameter.
|
double |
getDensity(double x)
This method computes the probability density function,
|
double |
getMaxDensity()
This method computes the maximum value of the density function, which is the
value at 0.
|
double |
getMean()
This method computes the mean in terms of the radius parameter.
|
double |
getMedian()
This method computes the median which is 0 regardless of the radius parameter.
|
double |
getQuantile(double p)
This method computes the quantile function in terms of the radius parameter.
|
double |
getRadius()
This method returns the radius parameter.
|
double |
getVariance()
This method computes the variance in terms of the radius parameter.
|
void |
setRadius(double r)
This method sets the radius parameter and computes the domain of the distribution.
|
double |
simulate()
This method simulates a value from the distribution.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
public CircleDistribution(double r)
r
- the radiuspublic CircleDistribution()
public void setRadius(double r)
r
- the radiuspublic double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distributionpublic double getMaxDensity()
getMaxDensity
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMedian()
getMedian
in class Distribution
public double getRadius()
public double simulate()
simulate
in class Distribution
public double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distributionpublic double getQuantile(double p)
getQuantile
in class Distribution
p
- a probability in (0, 1)public java.lang.String toString()
toString
in class Distribution