public abstract class AbstractRealDistribution extends Object implements RealDistribution, Serializable
| Modifier and Type | Field and Description |
|---|---|
static double |
SOLVER_DEFAULT_ABSOLUTE_ACCURACY
Default accuracy.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cumulativeProbability(double x0,
double x1)
Deprecated.
As of 3.1 (to be removed in 4.0). Please use
probability(double,double) instead. |
double |
inverseCumulativeProbability(double p)
Computes the quantile function of this distribution.
|
double |
logDensity(double x)
Returns the natural logarithm of the probability density function (PDF) of this distribution
evaluated at the specified point
x. |
double |
probability(double x)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(X = x). |
double |
probability(double x0,
double x1)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1). |
void |
reseedRandomGenerator(long seed)
Reseed the random generator used to generate samples.
|
double |
sample()
Generate a random value sampled from this distribution.
|
double[] |
sample(int sampleSize)
Generate a random sample from the distribution.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcumulativeProbability, density, getNumericalMean, getNumericalVariance, getSupportLowerBound, getSupportUpperBound, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusivepublic static final double SOLVER_DEFAULT_ABSOLUTE_ACCURACY
@Deprecated public double cumulativeProbability(double x0, double x1) throws NumberIsTooLargeException
probability(double,double) instead.X whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1).
The default implementation uses the identity
P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)
cumulativeProbability in interface RealDistributionx0 - the exclusive lower boundx1 - the inclusive upper boundx0 and x1,
excluding the lower and including the upper endpointNumberIsTooLargeException - if x0 > x1public double probability(double x0,
double x1)
X whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1).x0 - Lower bound (excluded).x1 - Upper bound (included).x0 and x1, excluding the lower
and including the upper endpoint.NumberIsTooLargeException - if x0 > x1.
The default implementation uses the identity
P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)public double inverseCumulativeProbability(double p)
throws OutOfRangeException
X distributed according to this distribution, the
returned value is
inf{x in R | P(X<=x) >= p} for 0 < p <= 1,inf{x in R | P(X<=x) > 0} for p = 0.RealDistribution.getSupportLowerBound() for p = 0,RealDistribution.getSupportUpperBound() for p = 1.inverseCumulativeProbability in interface RealDistributionp - the cumulative probabilityp-quantile of this distribution
(largest 0-quantile for p = 0)OutOfRangeException - if p < 0 or p > 1public void reseedRandomGenerator(long seed)
reseedRandomGenerator in interface RealDistributionseed - the new seedpublic double sample()
sample in interface RealDistributionpublic double[] sample(int sampleSize)
sample() in a loop.sample in interface RealDistributionsampleSize - the number of random values to generatepublic double probability(double x)
X whose values are distributed according
to this distribution, this method returns P(X = x). In other
words, this method represents the probability mass function (PMF)
for the distribution.probability in interface RealDistributionx - the point at which the PMF is evaluatedpublic double logDensity(double x)
x. In general, the PDF is the derivative of the
CDF. If the derivative does not exist at x,
then an appropriate replacement should be returned, e.g. Double.POSITIVE_INFINITY,
Double.NaN, or the limit inferior or limit superior of the difference quotient. Note
that due to the floating point precision and under/overflow issues, this method will for some
distributions be more precise and faster than computing the logarithm of
RealDistribution.density(double). The default implementation simply computes the logarithm of
density(x).x - the point at which the PDF is evaluatedxJas4pp 1.5 © Java Analysis Studio for Particle Physics