MATH-838
Moved the "probability(double)" method to the parent class. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1369202 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44b2830b88
commit
6ec0872f28
|
@ -244,5 +244,14 @@ implements RealDistribution, Serializable {
|
|||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @return zero.
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0d;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,17 +122,6 @@ public class BetaDistribution extends AbstractRealDistribution {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
recomputeZ();
|
||||
|
|
|
@ -128,17 +128,6 @@ public class CauchyDistribution extends AbstractRealDistribution {
|
|||
return scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
final double dev = x - median;
|
||||
|
|
|
@ -92,17 +92,6 @@ public class ChiSquaredDistribution extends AbstractRealDistribution {
|
|||
return gamma.getAlpha() * 2.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return zero.
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
return gamma.density(x);
|
||||
|
|
|
@ -143,17 +143,6 @@ public class ExponentialDistribution extends AbstractRealDistribution {
|
|||
return mean;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
if (x < 0) {
|
||||
|
|
|
@ -120,17 +120,6 @@ public class FDistribution extends AbstractRealDistribution {
|
|||
solverAbsoluteAccuracy = inverseCumAccuracy;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
|
|
@ -189,17 +189,6 @@ public class GammaDistribution extends AbstractRealDistribution {
|
|||
return scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
/* The present method must return the value of
|
||||
|
|
|
@ -155,17 +155,6 @@ public class LogNormalDistribution extends AbstractRealDistribution {
|
|||
return shape;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
|
|
@ -130,17 +130,6 @@ public class NormalDistribution extends AbstractRealDistribution {
|
|||
return standardDeviation;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return zero.
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
final double x0 = x - mean;
|
||||
|
|
|
@ -105,17 +105,6 @@ public class TDistribution extends AbstractRealDistribution {
|
|||
return degreesOfFreedom;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
final double n = degreesOfFreedom;
|
||||
|
|
|
@ -126,17 +126,6 @@ public class TriangularDistribution extends AbstractRealDistribution {
|
|||
return solverAbsoluteAccuracy;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
|
|
@ -104,17 +104,6 @@ public class UniformRealDistribution extends AbstractRealDistribution {
|
|||
solverAbsoluteAccuracy = inverseCumAccuracy;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
if (x < lower || x > upper) {
|
||||
|
|
|
@ -142,17 +142,6 @@ public class WeibullDistribution extends AbstractRealDistribution {
|
|||
return scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* For this distribution {@code P(X = x)} always evaluates to 0.
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
public double probability(double x) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public double density(double x) {
|
||||
if (x < 0) {
|
||||
|
|
Loading…
Reference in New Issue