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:
Gilles Sadowski 2012-08-03 20:50:33 +00:00
parent 44b2830b88
commit 6ec0872f28
13 changed files with 9 additions and 132 deletions

View File

@ -244,5 +244,14 @@ implements RealDistribution, Serializable {
}
return out;
}
/**
* {@inheritDoc}
*
* @return zero.
*/
public double probability(double x) {
return 0d;
}
}

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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}
*

View File

@ -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

View File

@ -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}
*

View File

@ -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;

View File

@ -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;

View File

@ -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}
*

View File

@ -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) {

View File

@ -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) {