From a4947309cd0e9dd7430ea462beeca2738ceb05ae Mon Sep 17 00:00:00 2001 From: "Mark R. Diggory" Date: Thu, 16 Oct 2003 15:24:33 +0000 Subject: [PATCH] PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23716 Submitted by: Brent Warden Reviewed by: Mark Diggory git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141004 13f79535-47bb-0310-9956-ffa450edef68 --- .../{analysis => }/ConvergenceException.java | 10 +++---- .../math/MathConfigurationException.java | 4 +-- .../apache/commons/math/MathException.java | 4 +-- .../math/analysis/BisectionSolver.java | 4 +-- .../commons/math/analysis/BrentSolver.java | 4 +-- .../math/analysis/CubicSplineFunction.java | 4 +-- .../commons/math/analysis/SecantSolver.java | 4 +-- .../math/analysis/SplineInterpolator.java | 8 ++--- .../math/analysis/UnivariateRealFunction.java | 4 +-- .../analysis/UnivariateRealInterpolator.java | 4 +-- .../math/analysis/UnivariateRealSolver.java | 4 +-- .../analysis/UnivariateRealSolverFactory.java | 4 +-- .../UnivariateRealSolverFactoryImpl.java | 4 +-- .../analysis/UnivariateRealSolverImpl.java | 4 +-- .../analysis/UnivariateRealSolverUtils.java | 4 +-- .../AbstractContinuousDistribution.java | 4 +-- .../AbstractDiscreteDistribution.java | 4 +-- .../distribution/BinomialDistribution.java | 4 +-- .../BinomialDistributionImpl.java | 17 ++++++++--- .../distribution/ChiSquaredDistribution.java | 4 +-- .../ChiSquaredDistributionImpl.java | 4 +-- .../distribution/ContinuousDistribution.java | 4 +-- .../distribution/DiscreteDistribution.java | 4 +-- .../distribution/DistributionFactory.java | 4 +-- .../distribution/DistributionFactoryImpl.java | 4 +-- .../distribution/ExponentialDistribution.java | 4 +-- .../ExponentialDistributionImpl.java | 4 +-- .../math/distribution/FDistribution.java | 4 +-- .../math/distribution/FDistributionImpl.java | 19 ++++++++---- .../math/distribution/GammaDistribution.java | 4 +-- .../distribution/GammaDistributionImpl.java | 15 ++++++++-- .../HypergeometricDistribution.java | 4 +-- .../HypergeometricDistributionImpl.java | 4 +-- .../math/distribution/TDistribution.java | 4 +-- .../math/distribution/TDistributionImpl.java | 30 ++++++++++++------- .../commons/math/linear/RealMatrix.java | 4 +-- .../commons/math/linear/RealMatrixImpl.java | 4 +-- .../math/random/EmpiricalDistribution.java | 4 +-- .../random/EmpiricalDistributionImpl.java | 4 +-- .../commons/math/random/RandomData.java | 4 +-- .../commons/math/random/RandomDataImpl.java | 4 +-- .../commons/math/random/ValueServer.java | 4 +-- .../org/apache/commons/math/special/Beta.java | 25 ++++++++++------ .../apache/commons/math/special/Gamma.java | 17 +++++++---- .../math/stat/AbstractStoreUnivariate.java | 4 +-- .../commons/math/stat/AbstractUnivariate.java | 4 +-- .../apache/commons/math/stat/Applyable.java | 3 +- .../math/stat/BeanListUnivariateImpl.java | 4 +-- .../math/stat/BivariateRegression.java | 4 +-- .../apache/commons/math/stat/Frequency.java | 4 +-- .../commons/math/stat/ListUnivariateImpl.java | 4 +-- .../apache/commons/math/stat/StatUtils.java | 4 +-- .../commons/math/stat/StoreUnivariate.java | 4 +-- .../math/stat/StoreUnivariateImpl.java | 4 +-- .../commons/math/stat/TestStatistic.java | 4 +-- .../commons/math/stat/TestStatisticImpl.java | 4 +-- .../apache/commons/math/stat/Univariate.java | 4 +-- .../commons/math/stat/UnivariateImpl.java | 4 +-- .../AbstractStorelessUnivariateStatistic.java | 4 +-- .../AbstractUnivariateStatistic.java | 4 +-- .../StorelessUnivariateStatistic.java | 4 +-- .../stat/univariate/UnivariateStatistic.java | 4 +-- .../stat/univariate/moment/FirstMoment.java | 4 +-- .../stat/univariate/moment/FourthMoment.java | 4 +-- .../stat/univariate/moment/GeometricMean.java | 4 +-- .../math/stat/univariate/moment/Kurtosis.java | 4 +-- .../math/stat/univariate/moment/Mean.java | 4 +-- .../stat/univariate/moment/SecondMoment.java | 4 +-- .../math/stat/univariate/moment/Skewness.java | 4 +-- .../univariate/moment/StandardDeviation.java | 4 +-- .../stat/univariate/moment/ThirdMoment.java | 4 +-- .../math/stat/univariate/moment/Variance.java | 4 +-- .../math/stat/univariate/rank/Max.java | 4 +-- .../math/stat/univariate/rank/Median.java | 4 +-- .../math/stat/univariate/rank/Min.java | 4 +-- .../math/stat/univariate/rank/Percentile.java | 4 +-- .../math/stat/univariate/summary/Product.java | 4 +-- .../math/stat/univariate/summary/Sum.java | 4 +-- .../stat/univariate/summary/SumOfLogs.java | 4 +-- .../stat/univariate/summary/SumOfSquares.java | 4 +-- .../commons/math/util/BeanTransformer.java | 4 +-- .../commons/math/util/ContinuedFraction.java | 25 +++++++++++----- .../math/util/ContractableDoubleArray.java | 4 +-- .../commons/math/util/DefaultTransformer.java | 4 +-- .../apache/commons/math/util/DoubleArray.java | 4 +-- .../math/util/ExpandableDoubleArray.java | 4 +-- .../commons/math/util/FixedDoubleArray.java | 4 +-- .../apache/commons/math/util/MathUtils.java | 4 +-- .../commons/math/util/NumberTransformer.java | 5 ++-- .../commons/math/util/TransformerMap.java | 4 +-- .../math/MathConfigurationExceptionTest.java | 4 +-- .../commons/math/MathExceptionTest.java | 4 +-- .../org/apache/commons/math/TestUtils.java | 4 +-- .../math/analysis/BisectionSolverTest.java | 4 +-- .../analysis/ConvergenceExceptionTest.java | 6 ++-- .../math/analysis/InterpolatorTest.java | 4 +-- .../math/analysis/QuinticFunction.java | 4 +-- .../commons/math/analysis/RealSolverTest.java | 4 +-- .../commons/math/analysis/SinFunction.java | 4 +-- .../UnivariateRealSolverUtilsTest.java | 4 +-- .../apache/commons/math/beans/Patient.java | 4 +-- .../apache/commons/math/beans/VitalStats.java | 4 +-- .../BinomialDistributionTest.java | 4 +-- .../ChiSquareDistributionTest.java | 4 +-- .../DistributionFactoryImplTest.java | 4 +-- .../ExponentialDistributionTest.java | 4 +-- .../math/distribution/FDistributionTest.java | 4 +-- .../distribution/GammaDistributionTest.java | 4 +-- .../HypergeometricDistributionTest.java | 4 +-- .../math/distribution/TDistributionTest.java | 4 +-- .../math/linear/RealMatrixImplTest.java | 4 +-- .../random/EmpiricalDistributionTest.java | 4 +-- .../commons/math/random/RandomDataTest.java | 4 +-- .../commons/math/random/ValueServerTest.java | 4 +-- .../apache/commons/math/special/BetaTest.java | 27 +++++++++-------- .../commons/math/special/GammaTest.java | 13 +++++--- .../math/stat/BeanListUnivariateImplTest.java | 4 +-- .../math/stat/BivariateRegressionTest.java | 4 +-- .../commons/math/stat/CertifiedDataTest.java | 4 +-- .../commons/math/stat/FrequencyTest.java | 4 +-- .../math/stat/ListUnivariateImplTest.java | 4 +-- .../stat/MixedListUnivariateImplTest.java | 4 +-- .../commons/math/stat/StatUtilsTest.java | 4 +-- .../math/stat/StoreUnivariateImplTest.java | 4 +-- .../commons/math/stat/TestStatisticTest.java | 4 +-- .../commons/math/stat/UnivariateImplTest.java | 4 +-- .../math/stat/univariate/InteractionTest.java | 4 +-- ...relessUnivariateStatisticAbstractTest.java | 4 +-- .../UnivariateStatisticAbstractTest.java | 4 +-- .../univariate/moment/GeometricMeanTest.java | 4 +-- .../stat/univariate/moment/KurtosisTest.java | 4 +-- .../math/stat/univariate/moment/MeanTest.java | 4 +-- .../stat/univariate/moment/SkewnessTest.java | 4 +-- .../moment/StandardDeviationTest.java | 4 +-- .../stat/univariate/moment/VarianceTest.java | 4 +-- .../math/stat/univariate/rank/MaxTest.java | 4 +-- .../math/stat/univariate/rank/MedianTest.java | 4 +-- .../math/stat/univariate/rank/MinTest.java | 4 +-- .../stat/univariate/rank/PercentileTest.java | 4 +-- .../stat/univariate/summary/ProductTest.java | 4 +-- .../stat/univariate/summary/SumLogTest.java | 4 +-- .../stat/univariate/summary/SumSqTest.java | 4 +-- .../math/stat/univariate/summary/SumTest.java | 4 +-- .../math/util/BeanTransformerTest.java | 4 +-- .../math/util/ContinuedFractionTest.java | 15 +++++++--- .../util/ContractableDoubleArrayTest.java | 4 +-- .../math/util/DefaultTransformerTest.java | 4 +-- .../math/util/DoubleArrayAbstractTest.java | 4 +-- .../math/util/ExpandableDoubleArrayTest.java | 4 +-- .../math/util/FixedDoubleArrayTest.java | 4 +-- .../commons/math/util/MathUtilsTest.java | 4 +-- .../apache/commons/math/util/TestBean.java | 4 +-- .../commons/math/util/TransformerMapTest.java | 4 +-- 153 files changed, 431 insertions(+), 356 deletions(-) rename src/java/org/apache/commons/math/{analysis => }/ConvergenceException.java (92%) diff --git a/src/java/org/apache/commons/math/analysis/ConvergenceException.java b/src/java/org/apache/commons/math/ConvergenceException.java similarity index 92% rename from src/java/org/apache/commons/math/analysis/ConvergenceException.java rename to src/java/org/apache/commons/math/ConvergenceException.java index b69695e0a..8b21d057d 100644 --- a/src/java/org/apache/commons/math/analysis/ConvergenceException.java +++ b/src/java/org/apache/commons/math/ConvergenceException.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -51,17 +51,15 @@ * information on the Apache Software Foundation, please see * . */ -package org.apache.commons.math.analysis; - -import org.apache.commons.lang.exception.NestableRuntimeException; +package org.apache.commons.math; /** * Error thrown when a numerical computation can not be performed because the * numerical result failed to converge to a finite value. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:33 $ */ -public class ConvergenceException extends NestableRuntimeException { +public class ConvergenceException extends MathException { /** * Default constructor. */ diff --git a/src/java/org/apache/commons/math/MathConfigurationException.java b/src/java/org/apache/commons/math/MathConfigurationException.java index 1d1fd235d..b822431a2 100644 --- a/src/java/org/apache/commons/math/MathConfigurationException.java +++ b/src/java/org/apache/commons/math/MathConfigurationException.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -55,7 +55,7 @@ package org.apache.commons.math; /** * Signals a configuration problem with any of the factory methods. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:11:33 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:33 $ */ public class MathConfigurationException extends MathException { diff --git a/src/java/org/apache/commons/math/MathException.java b/src/java/org/apache/commons/math/MathException.java index df0c323b5..f40da1867 100644 --- a/src/java/org/apache/commons/math/MathException.java +++ b/src/java/org/apache/commons/math/MathException.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import org.apache.commons.lang.exception.NestableException; /** * A generic exception indicating problems in the math package. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:11:33 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:33 $ */ public class MathException extends NestableException { diff --git a/src/java/org/apache/commons/math/analysis/BisectionSolver.java b/src/java/org/apache/commons/math/analysis/BisectionSolver.java index 319dfb0b7..2c8317383 100644 --- a/src/java/org/apache/commons/math/analysis/BisectionSolver.java +++ b/src/java/org/apache/commons/math/analysis/BisectionSolver.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.math.MathException; * Provide the bisection algorithm for solving for zeros of real univariate * functions. It will only search for one zero in the given interval. The * function is supposed to be continuous but not necessarily smooth. - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class BisectionSolver extends UnivariateRealSolverImpl { /** diff --git a/src/java/org/apache/commons/math/analysis/BrentSolver.java b/src/java/org/apache/commons/math/analysis/BrentSolver.java index 14fed12ad..ba12e31d7 100644 --- a/src/java/org/apache/commons/math/analysis/BrentSolver.java +++ b/src/java/org/apache/commons/math/analysis/BrentSolver.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.MathException; * It will only search for one zero in the given interval. * The function is supposed to be continuous but not necessarily smooth. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public class BrentSolver extends UnivariateRealSolverImpl { /** diff --git a/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java b/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java index 2e22d0f30..001956827 100644 --- a/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java +++ b/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ import org.apache.commons.math.MathException; * polynominal coefficents are used. * Arguments outside of the domain cause an IllegalArgumentException. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class CubicSplineFunction implements UnivariateRealFunction { /** Spline segment interval delimiters. Size is N+1 for N segments. */ diff --git a/src/java/org/apache/commons/math/analysis/SecantSolver.java b/src/java/org/apache/commons/math/analysis/SecantSolver.java index 500ea4b89..940cb557e 100644 --- a/src/java/org/apache/commons/math/analysis/SecantSolver.java +++ b/src/java/org/apache/commons/math/analysis/SecantSolver.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import org.apache.commons.math.MathException; * It will only search for one zero in the given interval. * The function is supposed to be continuous but not necessarily smooth. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public class SecantSolver extends UnivariateRealSolverImpl { /** diff --git a/src/java/org/apache/commons/math/analysis/SplineInterpolator.java b/src/java/org/apache/commons/math/analysis/SplineInterpolator.java index 09e216f27..4b0e4b859 100644 --- a/src/java/org/apache/commons/math/analysis/SplineInterpolator.java +++ b/src/java/org/apache/commons/math/analysis/SplineInterpolator.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.analysis; /** * Computes a natural spline interpolation for the data set. * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:31 $ * */ public class SplineInterpolator implements UnivariateRealInterpolator { @@ -144,8 +144,8 @@ public class SplineInterpolator implements UnivariateRealInterpolator { c[i][3] = (d[i] - d[i - 1]) / delta / 6.0; c[i][2] = d[i - 1] / 2.0; c[i][1] = - (yval[i + 1] - yval[i]) / delta - - (d[i] / 2.0 - d[i - 1]) * delta / 3.0; + (yval[i + 1] - yval[i]) / delta - + (d[i] / 2.0 - d[i - 1]) * delta / 3.0; } delta = (xval[n] - xval[n - 1]); c[n - 1][3] = -d[n - 2] / delta / 6.0; diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java b/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java index 384e987a1..73ad103bf 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.MathException; * that derivatives are evaluated after the value, the evaluation algorithm * should throw an InvalidStateException if it can't cope with this. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public interface UnivariateRealFunction { /** diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java b/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java index d8ee75228..345552f5b 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ import org.apache.commons.math.MathException; /** * Interface for interpolating a data set. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public interface UnivariateRealInterpolator { diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java b/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java index 7679eade9..d3eae2c89 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import org.apache.commons.math.MathException; * functions. * An implementation will only search for one zero in the given interval. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public interface UnivariateRealSolver { diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java index 638a33726..ebc78c400 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactory.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import org.apache.commons.discovery.tools.DiscoverClass; * (this may be controversial, because the configuration data * may also be used for the default solver used by the static * solve() method). - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:31 $ */ public abstract class UnivariateRealSolverFactory { /** diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java index 5fde3deb7..b50395e12 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ package org.apache.commons.math.analysis; * (this may be controversial, because the configuration data * may also be used for the default solver used by the static * solve() method). - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public class UnivariateRealSolverFactoryImpl extends UnivariateRealSolverFactory { diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java index f7af28f47..f77b5661f 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import org.apache.commons.math.MathException; * Provide a default implementation for several functions useful to generic * solvers. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public abstract class UnivariateRealSolverImpl implements UnivariateRealSolver { diff --git a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverUtils.java b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverUtils.java index d450fc4ba..535b57c44 100644 --- a/src/java/org/apache/commons/math/analysis/UnivariateRealSolverUtils.java +++ b/src/java/org/apache/commons/math/analysis/UnivariateRealSolverUtils.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import org.apache.commons.math.MathException; /** * Utility routines for {@link UnivariateRealSolver} objects. - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:09:31 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class UnivariateRealSolverUtils { /** diff --git a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java index 9eca854d2..a21b4add0 100644 --- a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java +++ b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.analysis.UnivariateRealSolverUtils; * implementations for some of the methods that do not vary from distribution * to distribution. * - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:29 $ */ public abstract class AbstractContinuousDistribution implements ContinuousDistribution { diff --git a/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java b/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java index f3cea0aeb..853fd130e 100644 --- a/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java +++ b/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ package org.apache.commons.math.stat.distribution; * implementations for some of the methods that do not vary from distribution * to distribution. * - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:29 $ */ public abstract class AbstractDiscreteDistribution implements DiscreteDistribution { diff --git a/src/java/org/apache/commons/math/distribution/BinomialDistribution.java b/src/java/org/apache/commons/math/distribution/BinomialDistribution.java index 285557078..a80d7084a 100644 --- a/src/java/org/apache/commons/math/distribution/BinomialDistribution.java +++ b/src/java/org/apache/commons/math/distribution/BinomialDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ package org.apache.commons.math.stat.distribution; * Binomial Distribution * * - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:29 $ */ public interface BinomialDistribution extends DiscreteDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java b/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java index 4cd65e8a0..dcb864e41 100644 --- a/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,13 +53,15 @@ */ package org.apache.commons.math.stat.distribution; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.math.MathException; import org.apache.commons.math.special.Beta; import org.apache.commons.math.util.MathUtils; /** * The default implementation of {@link BinomialDistribution}. * - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:29 $ */ public class BinomialDistributionImpl extends AbstractDiscreteDistribution implements BinomialDistribution { @@ -158,8 +160,15 @@ public class BinomialDistributionImpl extends AbstractDiscreteDistribution } else if (x >= getNumberOfTrials()) { ret = 1.0; } else { - ret = 1.0 - Beta.regularizedBeta(getProbabilityOfSuccess(), - x + 1.0, getNumberOfTrials() - x); + try { + ret = 1.0 - Beta.regularizedBeta(getProbabilityOfSuccess(), + x + 1.0, getNumberOfTrials() - x); + } catch (MathException ex) { + LogFactory.getLog(getClass()).error( + "Failed to compute cummulative probability, returning NaN.", + ex); + ret = Double.NaN; + } } return ret; } diff --git a/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java b/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java index 60a031d16..c251d8bee 100644 --- a/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java +++ b/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ package org.apache.commons.math.stat.distribution; * Chi-Squared Distribution * * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:29 $ */ public interface ChiSquaredDistribution extends ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java b/src/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java index 53fec1c58..60140fa13 100644 --- a/src/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; /** * The default implementation of {@link ChiSquaredDistribution} * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:29 $ */ public class ChiSquaredDistributionImpl extends AbstractContinuousDistribution diff --git a/src/java/org/apache/commons/math/distribution/ContinuousDistribution.java b/src/java/org/apache/commons/math/distribution/ContinuousDistribution.java index 63c40a2f1..1c5c407a4 100644 --- a/src/java/org/apache/commons/math/distribution/ContinuousDistribution.java +++ b/src/java/org/apache/commons/math/distribution/ContinuousDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; /** * Base interface for various continuous distributions. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:29 $ */ public interface ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/DiscreteDistribution.java b/src/java/org/apache/commons/math/distribution/DiscreteDistribution.java index 6cfce40dd..725b0f8c5 100644 --- a/src/java/org/apache/commons/math/distribution/DiscreteDistribution.java +++ b/src/java/org/apache/commons/math/distribution/DiscreteDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; /** * Base interface for various discrete distributions. * - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:29 $ */ public interface DiscreteDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/DistributionFactory.java b/src/java/org/apache/commons/math/distribution/DistributionFactory.java index d35bb563f..b89c95ecb 100644 --- a/src/java/org/apache/commons/math/distribution/DistributionFactory.java +++ b/src/java/org/apache/commons/math/distribution/DistributionFactory.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -75,7 +75,7 @@ import org.apache.commons.discovery.tools.DiscoverClass; * ChiSquaredDistribution chi = factory.createChiSquareDistribution(5.0); * * - * @version $Revision: 1.13 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.14 $ $Date: 2003/10/16 15:24:29 $ */ public abstract class DistributionFactory { /** diff --git a/src/java/org/apache/commons/math/distribution/DistributionFactoryImpl.java b/src/java/org/apache/commons/math/distribution/DistributionFactoryImpl.java index 274fb1119..05b9e27ae 100644 --- a/src/java/org/apache/commons/math/distribution/DistributionFactoryImpl.java +++ b/src/java/org/apache/commons/math/distribution/DistributionFactoryImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ package org.apache.commons.math.stat.distribution; * A concrete distribution factory. This is the default factory used by * Commons-Math. * - * @version $Revision: 1.11 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.12 $ $Date: 2003/10/16 15:24:29 $ */ public class DistributionFactoryImpl extends DistributionFactory { /** diff --git a/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java b/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java index 3ac67170c..3e4022f66 100644 --- a/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java +++ b/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ package org.apache.commons.math.stat.distribution; *
  • * Exponential Distribution
  • * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:29 $ */ public interface ExponentialDistribution extends ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java b/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java index d0795b4b6..cb838727b 100644 --- a/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; /** * The default implementation of {@link ExponentialDistribution} * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:29 $ */ public class ExponentialDistributionImpl implements ExponentialDistribution { diff --git a/src/java/org/apache/commons/math/distribution/FDistribution.java b/src/java/org/apache/commons/math/distribution/FDistribution.java index 359303795..400b2a53f 100644 --- a/src/java/org/apache/commons/math/distribution/FDistribution.java +++ b/src/java/org/apache/commons/math/distribution/FDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ package org.apache.commons.math.stat.distribution; * F-Distribution * * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:29 $ */ public interface FDistribution extends ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/FDistributionImpl.java b/src/java/org/apache/commons/math/distribution/FDistributionImpl.java index 0be648dd8..1d23b6e3e 100644 --- a/src/java/org/apache/commons/math/distribution/FDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/FDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,13 +53,15 @@ */ package org.apache.commons.math.stat.distribution; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.math.MathException; import org.apache.commons.math.special.Beta; /** * Default implementation of * {@link org.apache.commons.math.stat.distribution.FDistribution}. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:29 $ */ public class FDistributionImpl extends AbstractContinuousDistribution @@ -104,9 +106,16 @@ public class FDistributionImpl double n = getNumeratorDegreesOfFreedom(); double m = getDenominatorDegreesOfFreedom(); - ret = Beta.regularizedBeta((n * x) / (m + n * x), - 0.5 * n, - 0.5 * m); + try { + ret = Beta.regularizedBeta((n * x) / (m + n * x), + 0.5 * n, + 0.5 * m); + } catch (MathException ex) { + LogFactory.getLog(getClass()).error( + "Failed to compute cummulative probability, returning NaN.", + ex); + ret = Double.NaN; + } } return ret; } diff --git a/src/java/org/apache/commons/math/distribution/GammaDistribution.java b/src/java/org/apache/commons/math/distribution/GammaDistribution.java index 65fafce15..f8a28e762 100644 --- a/src/java/org/apache/commons/math/distribution/GammaDistribution.java +++ b/src/java/org/apache/commons/math/distribution/GammaDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ package org.apache.commons.math.stat.distribution; * Gamma Distribution * * - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:29 $ */ public interface GammaDistribution extends ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java b/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java index 03a72ce68..49eab588e 100644 --- a/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,12 +53,14 @@ */ package org.apache.commons.math.stat.distribution; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.math.MathException; import org.apache.commons.math.special.Gamma; /** * The default implementation of {@link GammaDistribution} * - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:29 $ */ public class GammaDistributionImpl extends AbstractContinuousDistribution implements GammaDistribution { @@ -101,7 +103,14 @@ public class GammaDistributionImpl extends AbstractContinuousDistribution if (x <= 0.0) { ret = 0.0; } else { - ret = Gamma.regularizedGammaP(getAlpha(), x / getBeta()); + try { + ret = Gamma.regularizedGammaP(getAlpha(), x / getBeta()); + } catch(MathException ex){ + LogFactory.getLog(getClass()).error( + "Failed to compute cummulative probability, returning NaN.", + ex); + ret = Double.NaN; + } } return ret; diff --git a/src/java/org/apache/commons/math/distribution/HypergeometricDistribution.java b/src/java/org/apache/commons/math/distribution/HypergeometricDistribution.java index 3f80c3fee..39f368279 100644 --- a/src/java/org/apache/commons/math/distribution/HypergeometricDistribution.java +++ b/src/java/org/apache/commons/math/distribution/HypergeometricDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -66,7 +66,7 @@ package org.apache.commons.math.stat.distribution; * Hypergeometric Distribution * * - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:29 $ */ public interface HypergeometricDistribution extends DiscreteDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java b/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java index 72c349e46..741e27329 100644 --- a/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.math.util.MathUtils; /** * The default implementation of {@link HypergeometricDistribution}. * - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:29 $ */ public class HypergeometricDistributionImpl extends AbstractDiscreteDistribution implements HypergeometricDistribution diff --git a/src/java/org/apache/commons/math/distribution/TDistribution.java b/src/java/org/apache/commons/math/distribution/TDistribution.java index 898ff44d0..bf1b1336b 100644 --- a/src/java/org/apache/commons/math/distribution/TDistribution.java +++ b/src/java/org/apache/commons/math/distribution/TDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ package org.apache.commons.math.stat.distribution; * Student's t-Distribution * * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:29 $ */ public interface TDistribution extends ContinuousDistribution { /** diff --git a/src/java/org/apache/commons/math/distribution/TDistributionImpl.java b/src/java/org/apache/commons/math/distribution/TDistributionImpl.java index a826bc706..7e8b96a18 100644 --- a/src/java/org/apache/commons/math/distribution/TDistributionImpl.java +++ b/src/java/org/apache/commons/math/distribution/TDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,13 +53,15 @@ */ package org.apache.commons.math.stat.distribution; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.math.MathException; import org.apache.commons.math.special.Beta; /** * Default implementation of * {@link org.apache.commons.math.stat.distribution.TDistribution}. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:29 $ */ public class TDistributionImpl extends AbstractContinuousDistribution @@ -107,14 +109,22 @@ public class TDistributionImpl if (x == 0.0) { ret = 0.5; } else { - double t = Beta.regularizedBeta( - getDegreesOfFreedom() / (getDegreesOfFreedom() + (x * x)), - 0.5 * getDegreesOfFreedom(), 0.5); - - if (x < 0.0) { - ret = 0.5 * t; - } else { - ret = 1.0 - 0.5 * t; + double t; + try { + t = Beta.regularizedBeta( + getDegreesOfFreedom() / (getDegreesOfFreedom() + (x * x)), + 0.5 * getDegreesOfFreedom(), + 0.5); + if (x < 0.0) { + ret = 0.5 * t; + } else { + ret = 1.0 - 0.5 * t; + } + } catch (MathException ex) { + LogFactory.getLog(getClass()).error( + "Failed to compute cummulative probability, returning NaN.", + ex); + ret = Double.NaN; } } diff --git a/src/java/org/apache/commons/math/linear/RealMatrix.java b/src/java/org/apache/commons/math/linear/RealMatrix.java index fce75af32..bcdc7f1c8 100644 --- a/src/java/org/apache/commons/math/linear/RealMatrix.java +++ b/src/java/org/apache/commons/math/linear/RealMatrix.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.linear; /** * Interface defining a real-valued matrix with basic algebraic operations - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:45 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:33 $ */ public interface RealMatrix { diff --git a/src/java/org/apache/commons/math/linear/RealMatrixImpl.java b/src/java/org/apache/commons/math/linear/RealMatrixImpl.java index 489820509..c5f523840 100644 --- a/src/java/org/apache/commons/math/linear/RealMatrixImpl.java +++ b/src/java/org/apache/commons/math/linear/RealMatrixImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -78,7 +78,7 @@ import java.io.Serializable; * explicitly invoke LUDecompose() to recompute the decomposition * before using any of the methods above. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:45 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public class RealMatrixImpl implements RealMatrix, Serializable { diff --git a/src/java/org/apache/commons/math/random/EmpiricalDistribution.java b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java index 9b519d912..f8abe5b31 100644 --- a/src/java/org/apache/commons/math/random/EmpiricalDistribution.java +++ b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -80,7 +80,7 @@ import org.apache.commons.math.stat.Univariate; * build grouped frequnecy histograms representing the input data or to * generate random values "like" those in the input file -- i.e., the values * generated will follow the distribution of the values in the file. - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:10:01 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:31 $ */ public interface EmpiricalDistribution { diff --git a/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java b/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java index 5242c04bf..72af201c1 100644 --- a/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java +++ b/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -89,7 +89,7 @@ import org.apache.commons.math.stat.UnivariateImpl; * entry per line. *

    * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:10:01 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:31 $ */ public class EmpiricalDistributionImpl implements Serializable,EmpiricalDistribution { diff --git a/src/java/org/apache/commons/math/random/RandomData.java b/src/java/org/apache/commons/math/random/RandomData.java index 2671ebc55..6934b75a3 100644 --- a/src/java/org/apache/commons/math/random/RandomData.java +++ b/src/java/org/apache/commons/math/random/RandomData.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import java.util.Collection; /** * Random data generation utilities - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:10:01 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public interface RandomData { /** diff --git a/src/java/org/apache/commons/math/random/RandomDataImpl.java b/src/java/org/apache/commons/math/random/RandomDataImpl.java index 1747a4efb..c31332f4c 100644 --- a/src/java/org/apache/commons/math/random/RandomDataImpl.java +++ b/src/java/org/apache/commons/math/random/RandomDataImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -104,7 +104,7 @@ import java.util.Collection; * (so secure sequences started with calls to reseedSecure(long) won't be * identical). * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:01 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public class RandomDataImpl implements RandomData { diff --git a/src/java/org/apache/commons/math/random/ValueServer.java b/src/java/org/apache/commons/math/random/ValueServer.java index 4fc2e4a4b..e6b1021ca 100644 --- a/src/java/org/apache/commons/math/random/ValueServer.java +++ b/src/java/org/apache/commons/math/random/ValueServer.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -78,7 +78,7 @@ import java.net.MalformedURLException; * standard deviation = sigma *
  • CONSTANT_MODE -- returns mu every time.
  • * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:10:01 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ * */ public class ValueServer { diff --git a/src/java/org/apache/commons/math/special/Beta.java b/src/java/org/apache/commons/math/special/Beta.java index 3205bc2a2..f7f36e448 100644 --- a/src/java/org/apache/commons/math/special/Beta.java +++ b/src/java/org/apache/commons/math/special/Beta.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,13 +53,14 @@ */ package org.apache.commons.math.special; +import org.apache.commons.math.MathException; import org.apache.commons.math.util.ContinuedFraction; /** * This is a utility class that provides computation methods related to the * Beta family of functions. * - * @version $Revision: 1.9 $ $Date: 2003/10/13 08:10:13 $ + * @version $Revision: 1.10 $ $Date: 2003/10/16 15:24:28 $ */ public class Beta { /** Maximum allowed numerical error. */ @@ -79,8 +80,11 @@ public class Beta { * @param a ??? * @param b ??? * @return the regularized beta function I(x, a, b) + * @throws MathException if the algorithm fails to converge. */ - public static double regularizedBeta(double x, double a, double b) { + public static double regularizedBeta(double x, double a, double b) + throws MathException + { return regularizedBeta(x, a, b, DEFAULT_EPSILON, Integer.MAX_VALUE); } @@ -94,10 +98,11 @@ public class Beta { * series is less than epsilon the approximation ceases * to calculate further elements in the series. * @return the regularized beta function I(x, a, b) + * @throws MathException if the algorithm fails to converge. */ public static double regularizedBeta(double x, double a, double b, - double epsilon) { - + double epsilon) throws MathException + { return regularizedBeta(x, a, b, epsilon, Integer.MAX_VALUE); } @@ -109,10 +114,11 @@ public class Beta { * @param b ??? * @param maxIterations Maximum number of "iterations" to complete. * @return the regularized beta function I(x, a, b) + * @throws MathException if the algorithm fails to converge. */ public static double regularizedBeta(double x, double a, double b, - int maxIterations) { - + int maxIterations) throws MathException + { return regularizedBeta(x, a, b, DEFAULT_EPSILON, maxIterations); } @@ -137,10 +143,11 @@ public class Beta { * to calculate further elements in the series. * @param maxIterations Maximum number of "iterations" to complete. * @return the regularized beta function I(x, a, b) + * @throws MathException if the algorithm fails to converge. */ public static double regularizedBeta(double x, final double a, - final double b, double epsilon, int maxIterations) { - + final double b, double epsilon, int maxIterations) throws MathException + { double ret; if (Double.isNaN(x) || Double.isNaN(a) || Double.isNaN(b) || (x < 0) || diff --git a/src/java/org/apache/commons/math/special/Gamma.java b/src/java/org/apache/commons/math/special/Gamma.java index 02a78eadf..2ce1d5093 100644 --- a/src/java/org/apache/commons/math/special/Gamma.java +++ b/src/java/org/apache/commons/math/special/Gamma.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,13 +53,14 @@ */ package org.apache.commons.math.special; -import org.apache.commons.math.analysis.ConvergenceException; +import org.apache.commons.math.ConvergenceException; +import org.apache.commons.math.MathException; /** * This is a utility class that provides computation methods related to the * Gamma family of functions. * - * @version $Revision: 1.11 $ $Date: 2003/10/13 08:10:13 $ + * @version $Revision: 1.12 $ $Date: 2003/10/16 15:24:28 $ */ public class Gamma { /** Maximum allowed numerical error. */ @@ -99,8 +100,11 @@ public class Gamma { * @param a ??? * @param x ??? * @return the regularized gamma function P(a, x) + * @throws MathException if the algorithm fails to converge. */ - public static double regularizedGammaP(double a, double x) { + public static double regularizedGammaP(double a, double x) + throws MathException + { return regularizedGammaP(a, x, DEFAULT_EPSILON, Integer.MAX_VALUE); } @@ -128,11 +132,14 @@ public class Gamma { * to calculate further elements in the series. * @param maxIterations Maximum number of "iterations" to complete. * @return the regularized gamma function P(a, x) + * @throws MathException if the algorithm fails to converge. */ public static double regularizedGammaP(double a, double x, double epsilon, - int maxIterations) { + int maxIterations) + throws MathException + { double ret; if (Double.isNaN(a) || Double.isNaN(x) || (a <= 0.0) || (x < 0.0)) { diff --git a/src/java/org/apache/commons/math/stat/AbstractStoreUnivariate.java b/src/java/org/apache/commons/math/stat/AbstractStoreUnivariate.java index 9cd6dc192..3e97ec0eb 100644 --- a/src/java/org/apache/commons/math/stat/AbstractStoreUnivariate.java +++ b/src/java/org/apache/commons/math/stat/AbstractStoreUnivariate.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.math.stat.univariate.rank.Percentile; /** * Provides univariate measures for an array of doubles. - * @version $Revision: 1.12 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.13 $ $Date: 2003/10/16 15:24:30 $ */ public abstract class AbstractStoreUnivariate extends AbstractUnivariate diff --git a/src/java/org/apache/commons/math/stat/AbstractUnivariate.java b/src/java/org/apache/commons/math/stat/AbstractUnivariate.java index 72f20b196..c58175345 100644 --- a/src/java/org/apache/commons/math/stat/AbstractUnivariate.java +++ b/src/java/org/apache/commons/math/stat/AbstractUnivariate.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -68,7 +68,7 @@ import org.apache.commons.math.stat.univariate.summary.SumOfSquares; /** * Provides univariate measures for an array of doubles. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public abstract class AbstractUnivariate implements Univariate { diff --git a/src/java/org/apache/commons/math/stat/Applyable.java b/src/java/org/apache/commons/math/stat/Applyable.java index a14245079..af270256a 100644 --- a/src/java/org/apache/commons/math/stat/Applyable.java +++ b/src/java/org/apache/commons/math/stat/Applyable.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,6 +60,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; * * TODO: add javadocs * + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:30 $ */ public interface Applyable { diff --git a/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java b/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java index 0fc9e6f1b..5197f6043 100644 --- a/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/BeanListUnivariateImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.util.BeanTransformer; * univariate statistics for a List of Java Beans by property. This * implementation uses beanutils' PropertyUtils to get a simple, nested, * indexed, mapped, or combined property from an element of a List. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public class BeanListUnivariateImpl extends ListUnivariateImpl { diff --git a/src/java/org/apache/commons/math/stat/BivariateRegression.java b/src/java/org/apache/commons/math/stat/BivariateRegression.java index a89b2b5db..a2ddce496 100644 --- a/src/java/org/apache/commons/math/stat/BivariateRegression.java +++ b/src/java/org/apache/commons/math/stat/BivariateRegression.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -84,7 +84,7 @@ import org.apache.commons.math.stat.distribution.TDistribution; * the necessary computations to return the requested statistic. * * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public class BivariateRegression { diff --git a/src/java/org/apache/commons/math/stat/Frequency.java b/src/java/org/apache/commons/math/stat/Frequency.java index c23240160..b20b1ac63 100644 --- a/src/java/org/apache/commons/math/stat/Frequency.java +++ b/src/java/org/apache/commons/math/stat/Frequency.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import org.apache.commons.collections.HashBag; * Accepts int, long or string values, converting * all to Strings and maintaining frequency counts. * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:30 $ */ public class Frequency { /** name for this frequency distribution. */ diff --git a/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java b/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java index b6d65c4ea..37ad7c34d 100644 --- a/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/ListUnivariateImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import org.apache.commons.math.util.DefaultTransformer; import org.apache.commons.math.util.NumberTransformer; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public class ListUnivariateImpl extends AbstractStoreUnivariate diff --git a/src/java/org/apache/commons/math/stat/StatUtils.java b/src/java/org/apache/commons/math/stat/StatUtils.java index c5c4ad952..0d9579051 100644 --- a/src/java/org/apache/commons/math/stat/StatUtils.java +++ b/src/java/org/apache/commons/math/stat/StatUtils.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat; * StatUtils provides easy static implementations of common double[] based * statistical methods. These return a single result value or in some cases, as * identified in the javadoc for each method, Double.NaN. - * @version $Revision: 1.17 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.18 $ $Date: 2003/10/16 15:24:30 $ */ public final class StatUtils { diff --git a/src/java/org/apache/commons/math/stat/StoreUnivariate.java b/src/java/org/apache/commons/math/stat/StoreUnivariate.java index 6f0f2682c..46fc3e2cb 100644 --- a/src/java/org/apache/commons/math/stat/StoreUnivariate.java +++ b/src/java/org/apache/commons/math/stat/StoreUnivariate.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ package org.apache.commons.math.stat; * Univariate provides additional percentile functionality * such as. This additional functionality comes with * a price of increased storage costs. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public interface StoreUnivariate extends Univariate { diff --git a/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java b/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java index 865ab76eb..cd6d203e5 100644 --- a/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/StoreUnivariateImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; import org.apache.commons.math.util.ContractableDoubleArray; /** - * @version $Revision: 1.9 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.10 $ $Date: 2003/10/16 15:24:30 $ */ public class StoreUnivariateImpl extends AbstractStoreUnivariate { diff --git a/src/java/org/apache/commons/math/stat/TestStatistic.java b/src/java/org/apache/commons/math/stat/TestStatistic.java index f0a109a49..c0b3b42c2 100644 --- a/src/java/org/apache/commons/math/stat/TestStatistic.java +++ b/src/java/org/apache/commons/math/stat/TestStatistic.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -55,7 +55,7 @@ package org.apache.commons.math.stat; /** * A collection of commonly used test statistics and statistical tests. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public interface TestStatistic { diff --git a/src/java/org/apache/commons/math/stat/TestStatisticImpl.java b/src/java/org/apache/commons/math/stat/TestStatisticImpl.java index 0e2d4ad55..84ba03e23 100644 --- a/src/java/org/apache/commons/math/stat/TestStatisticImpl.java +++ b/src/java/org/apache/commons/math/stat/TestStatisticImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.distribution.ChiSquaredDistribution; /** * Implements test statistics defined in the TestStatistic interface. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public class TestStatisticImpl implements TestStatistic { diff --git a/src/java/org/apache/commons/math/stat/Univariate.java b/src/java/org/apache/commons/math/stat/Univariate.java index 5157db934..944af4c5d 100644 --- a/src/java/org/apache/commons/math/stat/Univariate.java +++ b/src/java/org/apache/commons/math/stat/Univariate.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -69,7 +69,7 @@ package org.apache.commons.math.stat; * reported statistics will be based on these values

    * The default windowSize is "infinite" -- i.e., all values added are included * in all computations. - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:30 $ */ public interface Univariate extends Applyable{ /** diff --git a/src/java/org/apache/commons/math/stat/UnivariateImpl.java b/src/java/org/apache/commons/math/stat/UnivariateImpl.java index 47e70f0de..8a09f22e3 100644 --- a/src/java/org/apache/commons/math/stat/UnivariateImpl.java +++ b/src/java/org/apache/commons/math/stat/UnivariateImpl.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -67,7 +67,7 @@ import org.apache.commons.math.util.FixedDoubleArray; * Integers, floats and longs can be added, but they will be converted * to doubles by addValue(). * - * @version $Revision: 1.22 $ $Date: 2003/10/13 08:10:56 $ + * @version $Revision: 1.23 $ $Date: 2003/10/16 15:24:30 $ */ public class UnivariateImpl extends AbstractUnivariate diff --git a/src/java/org/apache/commons/math/stat/univariate/AbstractStorelessUnivariateStatistic.java b/src/java/org/apache/commons/math/stat/univariate/AbstractStorelessUnivariateStatistic.java index b3a208c0a..781db3ee0 100644 --- a/src/java/org/apache/commons/math/stat/univariate/AbstractStorelessUnivariateStatistic.java +++ b/src/java/org/apache/commons/math/stat/univariate/AbstractStorelessUnivariateStatistic.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ package org.apache.commons.math.stat.univariate; * Provides the ability to extend polymophically so that * indiviual statistics do not need to implement these methods unless * there are better algorithms for handling the calculation. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:33 $ */ public abstract class AbstractStorelessUnivariateStatistic extends AbstractUnivariateStatistic diff --git a/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java b/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java index 7d7b63e3d..931686852 100644 --- a/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java +++ b/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat.univariate; * Abstract Implementation for UnivariateStatistics. * Provides the ability to extend polymophically so that * indiviual statistics do not need to implement these methods. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:33 $ */ public abstract class AbstractUnivariateStatistic implements UnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java b/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java index bd24ca1a8..3e3c21f25 100644 --- a/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java +++ b/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ package org.apache.commons.math.stat.univariate; * implemented using it. If a Statistic cannot be implemented in a Storeless * approach it should implement the UnivariateStatistic interface directly * instead. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:33 $ */ public interface StorelessUnivariateStatistic extends UnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/UnivariateStatistic.java b/src/java/org/apache/commons/math/stat/univariate/UnivariateStatistic.java index 0daf472f6..d2a737bf8 100644 --- a/src/java/org/apache/commons/math/stat/univariate/UnivariateStatistic.java +++ b/src/java/org/apache/commons/math/stat/univariate/UnivariateStatistic.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ package org.apache.commons.math.stat.univariate; * double[] based content using an implemented statistical approach. * The interface provides two "stateless" simple methods to calculate * a statistic from a double[] based parameter. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:33 $ */ public interface UnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java b/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java index be804728e..657691189 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis * * recursive strategy * . Both incremental and evaluation strategies currently use this approach. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:32 $ */ public class FirstMoment extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java b/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java index c5026e858..eb18d8875 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ package org.apache.commons.math.stat.univariate.moment; * * recursive strategy * . Both incremental and evaluation strategies currently use this approach. - * @version $Revision: 1.9 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.10 $ $Date: 2003/10/16 15:24:32 $ */ public class FourthMoment extends ThirdMoment { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java b/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java index 236b369e2..83ee12a37 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ import org.apache.commons.math.stat.univariate.summary.SumOfLogs; /** * Returns the * geometric mean of the available values - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:32 $ */ public class GeometricMean extends SumOfLogs { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java b/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java index 0b30bc37b..31d8b8abc 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:32 $ */ public class Kurtosis extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java b/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java index faea49fbe..35684bf3f 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ import org.apache.commons.math.stat.univariate.summary.Sum; /** * Returns the * arithmetic mean of the available values. - * @version $Revision: 1.9 $ $Date: 2003/10/13 08:10:57 $ + * @version $Revision: 1.10 $ $Date: 2003/10/16 15:24:32 $ */ public class Mean extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java b/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java index ca64b8c9a..a1e039e01 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ package org.apache.commons.math.stat.univariate.moment; * * recursive strategy * . Both incremental and evaluation strategies currently use this approach. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:32 $ */ public class SecondMoment extends FirstMoment { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java b/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java index f8e9de955..982fa3ee8 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.univariate.moment; import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:32 $ */ public class Skewness extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java b/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java index 31dfef03c..82bbc285a 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -55,7 +55,7 @@ package org.apache.commons.math.stat.univariate.moment; /** * - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:32 $ */ public class StandardDeviation extends Variance { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java b/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java index 231c8d60f..f3c8a5d0c 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ package org.apache.commons.math.stat.univariate.moment; * * recursive strategy * . Both incremental and evaluation strategies currently use this approach. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:32 $ */ public class ThirdMoment extends SecondMoment { diff --git a/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java b/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java index ab25b3e5a..6953affbc 100644 --- a/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java +++ b/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis /** * - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:32 $ */ public class Variance extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/rank/Max.java b/src/java/org/apache/commons/math/stat/univariate/rank/Max.java index aed343e5e..6ab9d4292 100644 --- a/src/java/org/apache/commons/math/stat/univariate/rank/Max.java +++ b/src/java/org/apache/commons/math/stat/univariate/rank/Max.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public class Max extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/rank/Median.java b/src/java/org/apache/commons/math/stat/univariate/rank/Median.java index 63ece7163..53c3d3481 100644 --- a/src/java/org/apache/commons/math/stat/univariate/rank/Median.java +++ b/src/java/org/apache/commons/math/stat/univariate/rank/Median.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -55,7 +55,7 @@ package org.apache.commons.math.stat.univariate.rank; /** - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public class Median extends Percentile { diff --git a/src/java/org/apache/commons/math/stat/univariate/rank/Min.java b/src/java/org/apache/commons/math/stat/univariate/rank/Min.java index 95c0c5227..4ac4a1543 100644 --- a/src/java/org/apache/commons/math/stat/univariate/rank/Min.java +++ b/src/java/org/apache/commons/math/stat/univariate/rank/Min.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public class Min extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java b/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java index e3d8da62a..9de62d299 100644 --- a/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java +++ b/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import java.util.Arrays; import org.apache.commons.math.stat.univariate.AbstractUnivariateStatistic; /** - * @version $Revision: 1.7 $ $Date: 2003/10/16 15:15:04 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:30 $ */ public class Percentile extends AbstractUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/summary/Product.java b/src/java/org/apache/commons/math/stat/univariate/summary/Product.java index 4e694521e..7206783ad 100644 --- a/src/java/org/apache/commons/math/stat/univariate/summary/Product.java +++ b/src/java/org/apache/commons/math/stat/univariate/summary/Product.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:29 $ */ public class Product extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java b/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java index 4ae17d4bb..94d285c3c 100644 --- a/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java +++ b/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.univariate.summary; import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:29 $ */ public class Sum extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java b/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java index ddb1e7146..220d76447 100644 --- a/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java +++ b/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:29 $ */ public class SumOfLogs extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java b/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java index 6dab95c27..c4a9e968e 100644 --- a/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java +++ b/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org .AbstractStorelessUnivariateStatistic; /** - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:10:58 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:29 $ */ public class SumOfSquares extends AbstractStorelessUnivariateStatistic { diff --git a/src/java/org/apache/commons/math/util/BeanTransformer.java b/src/java/org/apache/commons/math/util/BeanTransformer.java index a94666d16..0b285ac82 100644 --- a/src/java/org/apache/commons/math/util/BeanTransformer.java +++ b/src/java/org/apache/commons/math/util/BeanTransformer.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.logging.LogFactory; /** * Uses PropertyUtils to map a Bean getter to a double value. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:30 $ */ public class BeanTransformer implements NumberTransformer { diff --git a/src/java/org/apache/commons/math/util/ContinuedFraction.java b/src/java/org/apache/commons/math/util/ContinuedFraction.java index 05b7b584c..652e3e004 100644 --- a/src/java/org/apache/commons/math/util/ContinuedFraction.java +++ b/src/java/org/apache/commons/math/util/ContinuedFraction.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,7 +53,8 @@ */ package org.apache.commons.math.util; -import org.apache.commons.math.analysis.ConvergenceException; +import org.apache.commons.math.ConvergenceException; +import org.apache.commons.math.MathException; /** * Provides a generic means to evaluate continued fractions. Subclasses simply @@ -64,7 +65,7 @@ import org.apache.commons.math.analysis.ConvergenceException; *

  • * Continued Fraction
  • * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public abstract class ContinuedFraction { /** Maximum allowed numerical error. */ @@ -99,8 +100,9 @@ public abstract class ContinuedFraction { * Evaluates the continued fraction at the value x. * @param x the evaluation point. * @return the value of the continued fraction evaluated at x. + * @throws MathException if the algorithm fails to converge. */ - public double evaluate(double x) { + public double evaluate(double x) throws MathException { return evaluate(x, DEFAULT_EPSILON, Integer.MAX_VALUE); } @@ -109,8 +111,9 @@ public abstract class ContinuedFraction { * @param x the evaluation point. * @param epsilon maximum error allowed. * @return the value of the continued fraction evaluated at x. + * @throws MathException if the algorithm fails to converge. */ - public double evaluate(double x, double epsilon) { + public double evaluate(double x, double epsilon) throws MathException { return evaluate(x, epsilon, Integer.MAX_VALUE); } @@ -119,8 +122,9 @@ public abstract class ContinuedFraction { * @param x the evaluation point. * @param maxIterations maximum number of convergents * @return the value of the continued fraction evaluated at x. + * @throws MathException if the algorithm fails to converge. */ - public double evaluate(double x, int maxIterations) { + public double evaluate(double x, int maxIterations) throws MathException { return evaluate(x, DEFAULT_EPSILON, maxIterations); } @@ -139,8 +143,11 @@ public abstract class ContinuedFraction { * @param epsilon maximum error allowed. * @param maxIterations maximum number of convergents * @return the value of the continued fraction evaluated at x. + * @throws MathException if the algorithm fails to converge. */ - public double evaluate(double x, double epsilon, int maxIterations) { + public double evaluate(double x, double epsilon, int maxIterations) + throws MathException + { double[][] f = new double[2][2]; double[][] a = new double[2][2]; double[][] an = new double[2][2]; @@ -165,6 +172,7 @@ public abstract class ContinuedFraction { * @param maxIterations maximum number of convergents * @return the value of the the n-th convergent for this continued fraction * evaluated at x. + * @throws MathException if the algorithm fails to converge. */ private double evaluate( int n, @@ -173,7 +181,8 @@ public abstract class ContinuedFraction { double[][] an, double[][] f, double epsilon, - int maxIterations) { + int maxIterations) throws MathException + { double ret; // create next matrix diff --git a/src/java/org/apache/commons/math/util/ContractableDoubleArray.java b/src/java/org/apache/commons/math/util/ContractableDoubleArray.java index 77373e867..1799c05e1 100644 --- a/src/java/org/apache/commons/math/util/ContractableDoubleArray.java +++ b/src/java/org/apache/commons/math/util/ContractableDoubleArray.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -88,7 +88,7 @@ import java.io.Serializable; * internal storage array is swapped. *

    * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:30 $ */ public class ContractableDoubleArray extends ExpandableDoubleArray diff --git a/src/java/org/apache/commons/math/util/DefaultTransformer.java b/src/java/org/apache/commons/math/util/DefaultTransformer.java index df3c053f3..d0d140bc6 100644 --- a/src/java/org/apache/commons/math/util/DefaultTransformer.java +++ b/src/java/org/apache/commons/math/util/DefaultTransformer.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.beanutils.converters.DoubleConverter; /** * A Default NumberTransformer for java.lang.Numbers and Numeric Strings. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public class DefaultTransformer implements NumberTransformer { /** Converter used to transform objects. */ diff --git a/src/java/org/apache/commons/math/util/DoubleArray.java b/src/java/org/apache/commons/math/util/DoubleArray.java index a6e524f63..ddb5f3395 100644 --- a/src/java/org/apache/commons/math/util/DoubleArray.java +++ b/src/java/org/apache/commons/math/util/DoubleArray.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ package org.apache.commons.math.util; * Collections API by allowing a user to select from a number of * array implementations with support for various storage mechanisms * such as automatic expansion, contraction, and array "rolling". - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:30 $ */ public interface DoubleArray { diff --git a/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java b/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java index 510256d31..518a45ddb 100644 --- a/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java +++ b/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -88,7 +88,7 @@ import java.io.Serializable; * expand the array 10 times - first from 2 -> 4. then 4 -> 8, 8 -> 16, * and so on until we reach 4096 which is sufficient to hold 3546 elements. *

    - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:30 $ */ public class ExpandableDoubleArray implements Serializable, DoubleArray { diff --git a/src/java/org/apache/commons/math/util/FixedDoubleArray.java b/src/java/org/apache/commons/math/util/FixedDoubleArray.java index c126be379..e0d8f4ba1 100644 --- a/src/java/org/apache/commons/math/util/FixedDoubleArray.java +++ b/src/java/org/apache/commons/math/util/FixedDoubleArray.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -82,7 +82,7 @@ package org.apache.commons.math.util; * "fixed" in memory, this implementation will never allocate, or copy * the internal storage array to a new array instance. *

    - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:30 $ */ public class FixedDoubleArray implements DoubleArray { diff --git a/src/java/org/apache/commons/math/util/MathUtils.java b/src/java/org/apache/commons/math/util/MathUtils.java index 52eaeefed..bc32efd82 100644 --- a/src/java/org/apache/commons/math/util/MathUtils.java +++ b/src/java/org/apache/commons/math/util/MathUtils.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.util; /** * Some useful additions to the built-in functions in {@link Math}. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public final class MathUtils { diff --git a/src/java/org/apache/commons/math/util/NumberTransformer.java b/src/java/org/apache/commons/math/util/NumberTransformer.java index d77f43f94..490d467be 100644 --- a/src/java/org/apache/commons/math/util/NumberTransformer.java +++ b/src/java/org/apache/commons/math/util/NumberTransformer.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import org.apache.commons.math.MathException; /** * Subclasses implementing this interface can transform Objects to doubles. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:30 $ */ public interface NumberTransformer { @@ -67,6 +67,7 @@ public interface NumberTransformer { * * @param o the Object to be transformed. * @return the double value of the Object. + * @throws MathException if the Object can not be transformed into a Double. */ double transform(Object o) throws MathException; } \ No newline at end of file diff --git a/src/java/org/apache/commons/math/util/TransformerMap.java b/src/java/org/apache/commons/math/util/TransformerMap.java index 41231f858..d9fc2fb99 100644 --- a/src/java/org/apache/commons/math/util/TransformerMap.java +++ b/src/java/org/apache/commons/math/util/TransformerMap.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import java.util.Set; * It provides a means to set NumberTransformers that will be selected * based on the Class of the object handed to the Maps * double transform(Object o) method. - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:11:23 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:30 $ */ public class TransformerMap implements NumberTransformer { diff --git a/src/test/org/apache/commons/math/MathConfigurationExceptionTest.java b/src/test/org/apache/commons/math/MathConfigurationExceptionTest.java index ae7b81247..39e35c1a9 100644 --- a/src/test/org/apache/commons/math/MathConfigurationExceptionTest.java +++ b/src/test/org/apache/commons/math/MathConfigurationExceptionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:33 $ */ public class MathConfigurationExceptionTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/MathExceptionTest.java b/src/test/org/apache/commons/math/MathExceptionTest.java index 988ace5ce..d4049b88c 100644 --- a/src/test/org/apache/commons/math/MathExceptionTest.java +++ b/src/test/org/apache/commons/math/MathExceptionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:33 $ */ public class MathExceptionTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/TestUtils.java b/src/test/org/apache/commons/math/TestUtils.java index 99945274c..0d7bbf699 100644 --- a/src/test/org/apache/commons/math/TestUtils.java +++ b/src/test/org/apache/commons/math/TestUtils.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math; import junit.framework.Assert; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:33 $ */ public class TestUtils { /** diff --git a/src/test/org/apache/commons/math/analysis/BisectionSolverTest.java b/src/test/org/apache/commons/math/analysis/BisectionSolverTest.java index 23ae1d272..2a8855292 100644 --- a/src/test/org/apache/commons/math/analysis/BisectionSolverTest.java +++ b/src/test/org/apache/commons/math/analysis/BisectionSolverTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ import org.apache.commons.math.MathException; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:28 $ */ public final class BisectionSolverTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/analysis/ConvergenceExceptionTest.java b/src/test/org/apache/commons/math/analysis/ConvergenceExceptionTest.java index 779057689..541577b4e 100644 --- a/src/test/org/apache/commons/math/analysis/ConvergenceExceptionTest.java +++ b/src/test/org/apache/commons/math/analysis/ConvergenceExceptionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -54,10 +54,12 @@ package org.apache.commons.math.analysis; +import org.apache.commons.math.ConvergenceException; + import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:28 $ */ public class ConvergenceExceptionTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/analysis/InterpolatorTest.java b/src/test/org/apache/commons/math/analysis/InterpolatorTest.java index 8c4e2576b..7586ba09a 100644 --- a/src/test/org/apache/commons/math/analysis/InterpolatorTest.java +++ b/src/test/org/apache/commons/math/analysis/InterpolatorTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import junit.framework.TestSuite; /** * Test the interpolation framework. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:09:07 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:28 $ */ public class InterpolatorTest extends TestCase { diff --git a/src/test/org/apache/commons/math/analysis/QuinticFunction.java b/src/test/org/apache/commons/math/analysis/QuinticFunction.java index b6217560c..837fa4e4b 100644 --- a/src/test/org/apache/commons/math/analysis/QuinticFunction.java +++ b/src/test/org/apache/commons/math/analysis/QuinticFunction.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ import org.apache.commons.math.MathException; /** * Auxillary class for testing solvers. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class QuinticFunction implements UnivariateRealFunction { diff --git a/src/test/org/apache/commons/math/analysis/RealSolverTest.java b/src/test/org/apache/commons/math/analysis/RealSolverTest.java index 329c9a805..cf29d48a0 100644 --- a/src/test/org/apache/commons/math/analysis/RealSolverTest.java +++ b/src/test/org/apache/commons/math/analysis/RealSolverTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -69,7 +69,7 @@ import junit.framework.TestSuite; * default absolute accuracy of 10E-8 for sinus and the quintic function around * zero, and 5..10 iterations for the other zeros. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public final class RealSolverTest extends TestCase { diff --git a/src/test/org/apache/commons/math/analysis/SinFunction.java b/src/test/org/apache/commons/math/analysis/SinFunction.java index 366ab9d75..816c98b36 100644 --- a/src/test/org/apache/commons/math/analysis/SinFunction.java +++ b/src/test/org/apache/commons/math/analysis/SinFunction.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import org.apache.commons.math.MathException; * which means linear approximation (Regula Falsi) will converge * quadratically. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class SinFunction implements UnivariateRealFunction { diff --git a/src/test/org/apache/commons/math/analysis/UnivariateRealSolverUtilsTest.java b/src/test/org/apache/commons/math/analysis/UnivariateRealSolverUtilsTest.java index 13364ce37..ef95aa187 100644 --- a/src/test/org/apache/commons/math/analysis/UnivariateRealSolverUtilsTest.java +++ b/src/test/org/apache/commons/math/analysis/UnivariateRealSolverUtilsTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.math.MathException; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:28 $ */ public class UnivariateRealSolverUtilsTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/beans/Patient.java b/src/test/org/apache/commons/math/beans/Patient.java index 37b7d0c40..1fbdc6738 100644 --- a/src/test/org/apache/commons/math/beans/Patient.java +++ b/src/test/org/apache/commons/math/beans/Patient.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -54,7 +54,7 @@ package org.apache.commons.math.beans; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:33 $ */ public class Patient { diff --git a/src/test/org/apache/commons/math/beans/VitalStats.java b/src/test/org/apache/commons/math/beans/VitalStats.java index 3bcd24673..0a114b240 100644 --- a/src/test/org/apache/commons/math/beans/VitalStats.java +++ b/src/test/org/apache/commons/math/beans/VitalStats.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -54,7 +54,7 @@ package org.apache.commons.math.beans; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:09:08 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:33 $ */ public class VitalStats { diff --git a/src/test/org/apache/commons/math/distribution/BinomialDistributionTest.java b/src/test/org/apache/commons/math/distribution/BinomialDistributionTest.java index cff5ff15b..c18a3c436 100644 --- a/src/test/org/apache/commons/math/distribution/BinomialDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/BinomialDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class BinomialDistributionTest extends TestCase { private BinomialDistribution b; diff --git a/src/test/org/apache/commons/math/distribution/ChiSquareDistributionTest.java b/src/test/org/apache/commons/math/distribution/ChiSquareDistributionTest.java index 1d97f3f24..64a1d561b 100644 --- a/src/test/org/apache/commons/math/distribution/ChiSquareDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/ChiSquareDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public class ChiSquareDistributionTest extends TestCase { private ChiSquaredDistribution chiSquare; diff --git a/src/test/org/apache/commons/math/distribution/DistributionFactoryImplTest.java b/src/test/org/apache/commons/math/distribution/DistributionFactoryImplTest.java index d7e5f412a..b33dcf2f9 100644 --- a/src/test/org/apache/commons/math/distribution/DistributionFactoryImplTest.java +++ b/src/test/org/apache/commons/math/distribution/DistributionFactoryImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.10 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.11 $ $Date: 2003/10/16 15:24:31 $ */ public class DistributionFactoryImplTest extends TestCase { /** */ diff --git a/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java b/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java index 6ef3b9a39..7676af8c4 100644 --- a/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -58,7 +58,7 @@ import org.apache.commons.math.TestUtils; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class ExponentialDistributionTest extends TestCase { private ExponentialDistribution exp; diff --git a/src/test/org/apache/commons/math/distribution/FDistributionTest.java b/src/test/org/apache/commons/math/distribution/FDistributionTest.java index 8afe0f898..524d73a63 100644 --- a/src/test/org/apache/commons/math/distribution/FDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/FDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public class FDistributionTest extends TestCase { private FDistribution f; diff --git a/src/test/org/apache/commons/math/distribution/GammaDistributionTest.java b/src/test/org/apache/commons/math/distribution/GammaDistributionTest.java index 24cc6b387..4e94c93a1 100644 --- a/src/test/org/apache/commons/math/distribution/GammaDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/GammaDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:31 $ */ public class GammaDistributionTest extends TestCase { public void testProbabilities(){ diff --git a/src/test/org/apache/commons/math/distribution/HypergeometricDistributionTest.java b/src/test/org/apache/commons/math/distribution/HypergeometricDistributionTest.java index aa06a678b..1ff363990 100644 --- a/src/test/org/apache/commons/math/distribution/HypergeometricDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/HypergeometricDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class HypergeometricDistributionTest extends TestCase { private HypergeometricDistribution h; diff --git a/src/test/org/apache/commons/math/distribution/TDistributionTest.java b/src/test/org/apache/commons/math/distribution/TDistributionTest.java index 3a792e01c..bfa1f4281 100644 --- a/src/test/org/apache/commons/math/distribution/TDistributionTest.java +++ b/src/test/org/apache/commons/math/distribution/TDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.distribution; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class TDistributionTest extends TestCase { private TDistribution t; diff --git a/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java b/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java index 726b0aa1b..d909a8bf4 100644 --- a/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java +++ b/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link RealMatrixImpl} class. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:07:26 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:33 $ */ public final class RealMatrixImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java b/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java index 8059bb2ab..8399867eb 100644 --- a/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java +++ b/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ import org.apache.commons.math.stat.UnivariateImpl; /** * Test cases for the EmpiricalDistribution class * - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:07:52 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:29 $ */ public final class EmpiricalDistributionTest extends TestCase { diff --git a/src/test/org/apache/commons/math/random/RandomDataTest.java b/src/test/org/apache/commons/math/random/RandomDataTest.java index 029271e07..2943f58a9 100644 --- a/src/test/org/apache/commons/math/random/RandomDataTest.java +++ b/src/test/org/apache/commons/math/random/RandomDataTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -68,7 +68,7 @@ import org.apache.commons.math.stat.UnivariateImpl; /** * Test cases for the RandomData class. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:07:52 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:29 $ */ public final class RandomDataTest extends TestCase { diff --git a/src/test/org/apache/commons/math/random/ValueServerTest.java b/src/test/org/apache/commons/math/random/ValueServerTest.java index c85407128..7eac1a71c 100644 --- a/src/test/org/apache/commons/math/random/ValueServerTest.java +++ b/src/test/org/apache/commons/math/random/ValueServerTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ import org.apache.commons.math.stat.UnivariateImpl; /** * Test cases for the ValueServer class. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:07:52 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:29 $ */ public final class ValueServerTest extends TestCase { diff --git a/src/test/org/apache/commons/math/special/BetaTest.java b/src/test/org/apache/commons/math/special/BetaTest.java index e51236603..5f05bf586 100644 --- a/src/test/org/apache/commons/math/special/BetaTest.java +++ b/src/test/org/apache/commons/math/special/BetaTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,10 +53,13 @@ */ package org.apache.commons.math.special; +import org.apache.commons.math.MathException; +import org.apache.commons.math.TestUtils; + import junit.framework.TestCase; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:08:06 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:32 $ */ public class BetaTest extends TestCase { /** @@ -67,22 +70,20 @@ public class BetaTest extends TestCase { super(name); } - private void testRegularizedBeta(double expected, double x, double a, double b) { - double actual = Beta.regularizedBeta(x, a, b); - if (Double.isNaN(expected)) { - assertTrue(Double.isNaN(actual)); - } else { - assertEquals(expected, actual, 10e-5); + private void testRegularizedBeta(double expected, double x, double a, + double b) + { + try { + double actual = Beta.regularizedBeta(x, a, b); + TestUtils.assertEquals(expected, actual, 10e-5); + } catch(MathException ex){ + fail(ex.getMessage()); } } private void testLogBeta(double expected, double a, double b) { double actual = Beta.logBeta(a, b); - if (Double.isNaN(expected)) { - assertTrue(Double.isNaN(actual)); - } else { - assertEquals(expected, actual, 10e-5); - } + TestUtils.assertEquals(expected, actual, 10e-5); } public void testRegularizedBetaNanPositivePositive() { diff --git a/src/test/org/apache/commons/math/special/GammaTest.java b/src/test/org/apache/commons/math/special/GammaTest.java index fa8b63be1..f03e23747 100644 --- a/src/test/org/apache/commons/math/special/GammaTest.java +++ b/src/test/org/apache/commons/math/special/GammaTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,12 +53,13 @@ */ package org.apache.commons.math.special; +import org.apache.commons.math.MathException; import org.apache.commons.math.TestUtils; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:06 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:32 $ */ public class GammaTest extends TestCase { /** @@ -70,8 +71,12 @@ public class GammaTest extends TestCase { } private void testRegularizedGamma(double expected, double a, double x) { - double actual = Gamma.regularizedGammaP(a, x); - TestUtils.assertEquals(expected, actual, 10e-5); + try { + double actual = Gamma.regularizedGammaP(a, x); + TestUtils.assertEquals(expected, actual, 10e-5); + } catch(MathException ex){ + fail(ex.getMessage()); + } } private void testLogGamma(double expected, double x) { diff --git a/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java index fb3048e95..ed32f74a6 100644 --- a/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/BeanListUnivariateImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -65,7 +65,7 @@ import org.apache.commons.math.beans.*; /** * Test cases for the {@link BeanListUnivariateImpl} class. * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:28 $ */ public final class BeanListUnivariateImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/BivariateRegressionTest.java b/src/test/org/apache/commons/math/stat/BivariateRegressionTest.java index 3c45d3496..8cdbd41f9 100644 --- a/src/test/org/apache/commons/math/stat/BivariateRegressionTest.java +++ b/src/test/org/apache/commons/math/stat/BivariateRegressionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import junit.framework.TestSuite; /** * Test cases for the TestStatistic class. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public final class BivariateRegressionTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/CertifiedDataTest.java b/src/test/org/apache/commons/math/stat/CertifiedDataTest.java index 4049c8e28..065a71f30 100644 --- a/src/test/org/apache/commons/math/stat/CertifiedDataTest.java +++ b/src/test/org/apache/commons/math/stat/CertifiedDataTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ import java.io.InputStreamReader; import org.apache.commons.logging.*; /** * Test cases for the {@link Univariate} class. - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:28 $ */ public class CertifiedDataTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/FrequencyTest.java b/src/test/org/apache/commons/math/stat/FrequencyTest.java index a955c49a3..b4cd4d746 100644 --- a/src/test/org/apache/commons/math/stat/FrequencyTest.java +++ b/src/test/org/apache/commons/math/stat/FrequencyTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Frequency} class. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:28 $ */ public final class FrequencyTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java index 373a1b57a..5c9731a96 100644 --- a/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/ListUnivariateImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:28 $ */ public final class ListUnivariateImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/MixedListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/MixedListUnivariateImplTest.java index 1c6572ae3..1903ea6ee 100644 --- a/src/test/org/apache/commons/math/stat/MixedListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/MixedListUnivariateImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -64,7 +64,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:28 $ */ public final class MixedListUnivariateImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/StatUtilsTest.java b/src/test/org/apache/commons/math/stat/StatUtilsTest.java index a3d779d33..1ad246bef 100644 --- a/src/test/org/apache/commons/math/stat/StatUtilsTest.java +++ b/src/test/org/apache/commons/math/stat/StatUtilsTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link StatUtils} class. - * @version $Revision: 1.7 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.8 $ $Date: 2003/10/16 15:24:28 $ */ public final class StatUtilsTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java index 60e255c4e..e89df8ec3 100644 --- a/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/StoreUnivariateImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -63,7 +63,7 @@ import org.apache.commons.math.random.RandomDataImpl; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.6 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.7 $ $Date: 2003/10/16 15:24:28 $ */ public final class StoreUnivariateImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/TestStatisticTest.java b/src/test/org/apache/commons/math/stat/TestStatisticTest.java index a11ea8bc2..ca9d1e163 100644 --- a/src/test/org/apache/commons/math/stat/TestStatisticTest.java +++ b/src/test/org/apache/commons/math/stat/TestStatisticTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import junit.framework.TestSuite; /** * Test cases for the TestStatistic class. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:28 $ */ public final class TestStatisticTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/UnivariateImplTest.java b/src/test/org/apache/commons/math/stat/UnivariateImplTest.java index 2653151e5..9f414dcc0 100644 --- a/src/test/org/apache/commons/math/stat/UnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/UnivariateImplTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.8 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.9 $ $Date: 2003/10/16 15:24:28 $ */ public final class UnivariateImplTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/univariate/InteractionTest.java b/src/test/org/apache/commons/math/stat/univariate/InteractionTest.java index d60bba689..1e3e61c73 100644 --- a/src/test/org/apache/commons/math/stat/univariate/InteractionTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/InteractionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.stat.univariate.moment.Variance; import junit.framework.TestCase; /** - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:33 $ */ public class InteractionTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java b/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java index 7ffac41f4..aa2c97d04 100644 --- a/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -56,7 +56,7 @@ package org.apache.commons.math.stat.univariate; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public abstract class StorelessUnivariateStatisticAbstractTest extends UnivariateStatisticAbstractTest { diff --git a/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java b/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java index 5cfd563b5..0892e631e 100644 --- a/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/UnivariateStatisticAbstractTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ import junit.framework.TestCase; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public abstract class UnivariateStatisticAbstractTest extends TestCase { diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java index 65cd17bcf..44cc16835 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:28 $ */ public class GeometricMeanTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java index 2dc3d5f66..ac7fcf71f 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class KurtosisTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java index d5d1421aa..8e1af824e 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:38 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class MeanTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java index 7a282b021..9424f52ea 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class SkewnessTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java index 76360a6fe..69e4a2f84 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class StandardDeviationTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java b/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java index 26d64d1b6..598d7c297 100644 --- a/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -62,7 +62,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:28 $ */ public class VarianceTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java b/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java index 77409a54b..d75402d20 100644 --- a/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:32 $ */ public class MaxTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java b/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java index 090d34902..36c92a544 100644 --- a/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:32 $ */ public class MedianTest extends UnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java b/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java index c03e5c082..a9fcc2102 100644 --- a/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:32 $ */ public class MinTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java b/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java index 20e9861fe..896591baf 100644 --- a/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/16 15:15:04 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:32 $ */ public class PercentileTest extends UnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java b/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java index cf48e9796..5fe9bb80e 100644 --- a/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public class ProductTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java b/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java index 471cfbd09..8b307386a 100644 --- a/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public class SumLogTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java b/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java index 0a47c09d5..fe4be99ee 100644 --- a/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public class SumSqTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java b/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java index e8fdce2ec..c680e2a4c 100644 --- a/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic; /** * Test cases for the {@link UnivariateStatistic} class. - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:08:39 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:33 $ */ public class SumTest extends StorelessUnivariateStatisticAbstractTest{ diff --git a/src/test/org/apache/commons/math/util/BeanTransformerTest.java b/src/test/org/apache/commons/math/util/BeanTransformerTest.java index 97a39a558..7d95f3ef1 100644 --- a/src/test/org/apache/commons/math/util/BeanTransformerTest.java +++ b/src/test/org/apache/commons/math/util/BeanTransformerTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -59,7 +59,7 @@ import org.apache.commons.math.TestUtils; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class BeanTransformerTest extends TestCase { diff --git a/src/test/org/apache/commons/math/util/ContinuedFractionTest.java b/src/test/org/apache/commons/math/util/ContinuedFractionTest.java index a63ad6e61..4fb231d81 100644 --- a/src/test/org/apache/commons/math/util/ContinuedFractionTest.java +++ b/src/test/org/apache/commons/math/util/ContinuedFractionTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -53,10 +53,12 @@ */ package org.apache.commons.math.util; +import org.apache.commons.math.MathException; + import junit.framework.TestCase; /** - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public class ContinuedFractionTest extends TestCase { /** @@ -77,7 +79,12 @@ public class ContinuedFractionTest extends TestCase { return 1.0; } }; - double gr = cf.evaluate(0.0, 10e-9); - assertEquals(1.61803399, gr, 10e-9); + + try { + double gr = cf.evaluate(0.0, 10e-9); + assertEquals(1.61803399, gr, 10e-9); + } catch (MathException e) { + fail(e.getMessage()); + } } } diff --git a/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java b/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java index dc166b7b5..6d871e7d4 100644 --- a/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/ContractableDoubleArrayTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.util; /** * This class contains test cases for the ExpandableDoubleArray. * - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public class ContractableDoubleArrayTest extends ExpandableDoubleArrayTest { diff --git a/src/test/org/apache/commons/math/util/DefaultTransformerTest.java b/src/test/org/apache/commons/math/util/DefaultTransformerTest.java index d5a34c4e3..828a69779 100644 --- a/src/test/org/apache/commons/math/util/DefaultTransformerTest.java +++ b/src/test/org/apache/commons/math/util/DefaultTransformerTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -61,7 +61,7 @@ import org.apache.commons.math.TestUtils; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class DefaultTransformerTest extends TestCase { /** diff --git a/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java b/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java index 7da9c2147..f2b49f1fe 100644 --- a/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java +++ b/src/test/org/apache/commons/math/util/DoubleArrayAbstractTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import junit.framework.TestCase; /** * This class contains test cases for the ExpandableDoubleArray. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public abstract class DoubleArrayAbstractTest extends TestCase { diff --git a/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java b/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java index f2da36ce4..425b4fa61 100644 --- a/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/ExpandableDoubleArrayTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.util; /** * This class contains test cases for the ExpandableDoubleArray. * - * @version $Revision: 1.4 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.5 $ $Date: 2003/10/16 15:24:31 $ */ public class ExpandableDoubleArrayTest extends DoubleArrayAbstractTest { diff --git a/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java b/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java index 77f911a08..be3f76286 100644 --- a/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java +++ b/src/test/org/apache/commons/math/util/FixedDoubleArrayTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.util; /** * This class contains test cases for the ExpandableDoubleArray. * - * @version $Revision: 1.5 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.6 $ $Date: 2003/10/16 15:24:31 $ */ public class FixedDoubleArrayTest extends DoubleArrayAbstractTest { diff --git a/src/test/org/apache/commons/math/util/MathUtilsTest.java b/src/test/org/apache/commons/math/util/MathUtilsTest.java index 79de411b8..7b1930792 100644 --- a/src/test/org/apache/commons/math/util/MathUtilsTest.java +++ b/src/test/org/apache/commons/math/util/MathUtilsTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -60,7 +60,7 @@ import junit.framework.TestSuite; /** * Test cases for the MathUtils class. * - * @version $Revision: 1.3 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.4 $ $Date: 2003/10/16 15:24:31 $ */ public final class MathUtilsTest extends TestCase { diff --git a/src/test/org/apache/commons/math/util/TestBean.java b/src/test/org/apache/commons/math/util/TestBean.java index 1ed76e068..432704b3b 100644 --- a/src/test/org/apache/commons/math/util/TestBean.java +++ b/src/test/org/apache/commons/math/util/TestBean.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -55,7 +55,7 @@ package org.apache.commons.math.util; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class TestBean { private Double x = new Double(1.0); diff --git a/src/test/org/apache/commons/math/util/TransformerMapTest.java b/src/test/org/apache/commons/math/util/TransformerMapTest.java index 5740d6d97..dcea3972d 100644 --- a/src/test/org/apache/commons/math/util/TransformerMapTest.java +++ b/src/test/org/apache/commons/math/util/TransformerMapTest.java @@ -29,7 +29,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their name without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -57,7 +57,7 @@ package org.apache.commons.math.util; import junit.framework.TestCase; /** - * @version $Revision: 1.2 $ $Date: 2003/10/13 08:07:11 $ + * @version $Revision: 1.3 $ $Date: 2003/10/16 15:24:31 $ */ public class TransformerMapTest extends TestCase { /**