[MATH-859] Remove deprecated isSupportXXXInclusive methods from RealDistribution.
This commit is contained in:
parent
4be09dfff2
commit
ece7c6fc67
|
@ -246,16 +246,6 @@ public class BetaDistribution extends AbstractRealDistribution {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -233,16 +233,6 @@ public class CauchyDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -173,16 +173,6 @@ public class ChiSquaredDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -89,16 +89,6 @@ public class ConstantRealDistribution extends AbstractRealDistribution {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -239,28 +239,6 @@ public class EnumeratedRealDistribution extends AbstractRealDistribution {
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* The support of this distribution includes the lower bound.
|
|
||||||
*
|
|
||||||
* @return {@code true}
|
|
||||||
*/
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* The support of this distribution includes the upper bound.
|
|
||||||
*
|
|
||||||
* @return {@code true}
|
|
||||||
*/
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -328,16 +328,6 @@ public class ExponentialDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -305,16 +305,6 @@ public class FDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -385,16 +385,6 @@ public class GammaDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -148,16 +148,6 @@ public class GumbelDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public boolean isSupportConnected() {
|
public boolean isSupportConnected() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -142,16 +142,6 @@ public class LaplaceDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public boolean isSupportConnected() {
|
public boolean isSupportConnected() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -171,19 +171,6 @@ public class LevyDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
// there is a division by x-mu in the computation, so density
|
|
||||||
// is not finite at lower bound, bound must be excluded
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
// upper bound is infinite, so it must be excluded
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public boolean isSupportConnected() {
|
public boolean isSupportConnected() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -336,16 +336,6 @@ public class LogNormalDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -142,16 +142,6 @@ public class LogisticDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public boolean isSupportConnected() {
|
public boolean isSupportConnected() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -170,16 +170,6 @@ public class NakagamiDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public boolean isSupportConnected() {
|
public boolean isSupportConnected() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -282,16 +282,6 @@ public class NormalDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -288,16 +288,6 @@ public class ParetoDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -135,32 +135,6 @@ public interface RealDistribution {
|
||||||
*/
|
*/
|
||||||
double getSupportUpperBound();
|
double getSupportUpperBound();
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the lower bound of support is in the domain of the density
|
|
||||||
* function. Returns true iff {@code getSupporLowerBound()} is finite and
|
|
||||||
* {@code density(getSupportLowerBound())} returns a non-NaN, non-infinite
|
|
||||||
* value.
|
|
||||||
*
|
|
||||||
* @return true if the lower bound of support is finite and the density
|
|
||||||
* function returns a non-NaN, non-infinite value there
|
|
||||||
* @deprecated to be removed in 4.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
boolean isSupportLowerBoundInclusive();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the upper bound of support is in the domain of the density
|
|
||||||
* function. Returns true iff {@code getSupportUpperBound()} is finite and
|
|
||||||
* {@code density(getSupportUpperBound())} returns a non-NaN, non-infinite
|
|
||||||
* value.
|
|
||||||
*
|
|
||||||
* @return true if the upper bound of support is finite and the density
|
|
||||||
* function returns a non-NaN, non-infinite value there
|
|
||||||
* @deprecated to be removed in 4.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
boolean isSupportUpperBoundInclusive();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this method to get information about whether the support is connected,
|
* Use this method to get information about whether the support is connected,
|
||||||
* i.e. whether all values between the lower and upper bound of the support
|
* i.e. whether all values between the lower and upper bound of the support
|
||||||
|
|
|
@ -249,16 +249,6 @@ public class TDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -241,16 +241,6 @@ public class TriangularDistribution extends AbstractRealDistribution {
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -213,16 +213,6 @@ public class UniformRealDistribution extends AbstractRealDistribution {
|
||||||
return upper;
|
return upper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -329,16 +329,6 @@ public class WeibullDistribution extends AbstractRealDistribution {
|
||||||
return Double.POSITIVE_INFINITY;
|
return Double.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportLowerBoundInclusive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
public boolean isSupportUpperBoundInclusive() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
|
|
|
@ -161,24 +161,6 @@ public class EnumeratedRealDistributionTest {
|
||||||
Assert.assertEquals(7, testDistribution.getSupportUpperBound(), 0);
|
Assert.assertEquals(7, testDistribution.getSupportUpperBound(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests if the distribution returns properly that the support includes the
|
|
||||||
* lower bound.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testIsSupportLowerBoundInclusive() {
|
|
||||||
Assert.assertTrue(testDistribution.isSupportLowerBoundInclusive());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests if the distribution returns properly that the support includes the
|
|
||||||
* upper bound.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testIsSupportUpperBoundInclusive() {
|
|
||||||
Assert.assertTrue(testDistribution.isSupportUpperBoundInclusive());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests if the distribution returns properly that the support is connected.
|
* Tests if the distribution returns properly that the support is connected.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -384,38 +384,6 @@ public abstract class RealDistributionAbstractTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify that isSupportLowerBoundInclusvie returns true iff the lower bound
|
|
||||||
* is finite and density is non-NaN, non-infinite there.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testIsSupportLowerBoundInclusive() {
|
|
||||||
final double lowerBound = distribution.getSupportLowerBound();
|
|
||||||
double result = Double.NaN;
|
|
||||||
result = distribution.density(lowerBound);
|
|
||||||
Assert.assertEquals(
|
|
||||||
!Double.isInfinite(lowerBound) && !Double.isNaN(result) &&
|
|
||||||
!Double.isInfinite(result),
|
|
||||||
distribution.isSupportLowerBoundInclusive());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify that isSupportUpperBoundInclusvie returns true iff the upper bound
|
|
||||||
* is finite and density is non-NaN, non-infinite there.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testIsSupportUpperBoundInclusive() {
|
|
||||||
final double upperBound = distribution.getSupportUpperBound();
|
|
||||||
double result = Double.NaN;
|
|
||||||
result = distribution.density(upperBound);
|
|
||||||
Assert.assertEquals(
|
|
||||||
!Double.isInfinite(upperBound) && !Double.isNaN(result) &&
|
|
||||||
!Double.isInfinite(result),
|
|
||||||
distribution.isSupportUpperBoundInclusive());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDistributionClone()
|
public void testDistributionClone()
|
||||||
throws IOException,
|
throws IOException,
|
||||||
|
|
Loading…
Reference in New Issue