Commons Math Release Notes "PolynomialSplineFunction": added method "isValidPoint" that checks whether a point is within the interpolation range. "BicubicSplineInterpolatingFunction": added method "isValidPoint" that checks whether a point is within the interpolation range. Fixed overflow in "HypergeometricDistribution". Fixed "nextPermutation" method (in "o.a.c.m.random.RandomDataGenerator"). This bug does not affect applications using a previous version of Commons Math. Buggy (private) method "shuffle" in "o.a.c.m.random.RandomDataGenerator" superseded by "MathArrays.shuffle" (cf. MATH-1010). Utility to shuffle an array. Created "RandomGeneratorFactory" (package "o.a.c.m.random") to reduce code duplication in "RandomDataGenerator". Created package ("o.a.c.m.fitting.leastsquares") for least-squares fitting, with implementations of "LevenbergMarquardtOptimizer" and "GaussNewtonOptimizer" adapted to a new ("fluent") API. Improved implementation of "sample" method of "UniformIntegerDistribution". Add mode function to StatUtils class Enabled LaTeX expressions in javadoc and site docs via MathJax. Add mode function to Frequency class. Fixed "MathArrays.linearCombination" when array length is 1. Implemented Gauss-Hermite quadrature scheme (in package "o.a.c.m.analysis.integration.gauss"). Documented limitation of "IterativeLegendreGaussIntegrator" (added warning about potential wrong usage). In "GaussNewtonOptimizer", check for convergence before updating the parameters estimation for the next iteration. Added midpoint integration method. Fixed NullPointerException in 2D and 3D sub-line intersections. Added append method to SimpleRegression, making this class map/reducible. Added append method to StorelessCovariance, making this class map/reducible. Added method "MathArrays#convolve(double[], double[])" to compute the discrete, linear convolution of two sequences. Added low-discrepancy random generator "HaltonSequenceGenerator". Added low-discrepancy random generator "SobolSequenceGenerator". Added "GeometricDistribution" to "o.a.c.m.distribution" package. Added "ParetoDistribution" to "o.a.c.m.distribution" package. Added clarification to the javadoc of "VectorFormat" and derived classes in case "," is used as a separator. Added "FuzzyKMeansClusterer" to "o.a.c.m.ml.clustering" package. Fixed inconsistent dimensions preventing use of secondary states in ODE events. Fixed wrong array dimensions in secondary equations handling in some cases. Fixed missing side effects of secondary equations on main state in Ordinary Differential Equations integration. Fixed inverse cumulative probability for uniform distribution. All contents of package "o.a.c.m.stat.clustering" refactored into new package "o.a.c.m.ml.clustering" and added support for additional distance measures in package "o.a.c.m.ml.distance": "CanberraDistance", "ChebyshevDistance", "EuclideanDistance" and "ManhattanDistance". "SpearmansCorrelation" now works correctly in case of a provided "NaturalRanking" with a "NaNStrategy.REMOVED" strategy and the input data contains NaN values. From version 4.0 onwards this strategy will not be supported anymore. Replaced hard-coded numbers in "LevenbergMarquardtOptimizer". Fixed loading of test file when path contains a space. Improved speed of FastMath.abs methods for all signatures, by removing branching. Improved speed of several FastMath methods. Fixed Complex.reciprocal() for zero argument. Improved speed of FastMath copysign methods. Added Multivariate Normal Mixture Model Fitting by Expectation Maximization. AbstractRealMatrix will now check for rectangular input arrays in its copySubMatrix methods. Increment iteration counter in optimization algorithms. Added a way to trigger only increasing or decreasing events in ODE integration. Fixed missing update in ODE event handlers, when a RESET_STATE is triggered. Made EmpiricalDisribution smoothing kernel pluggable. Added array-scaling methods to MathArrays. Allow direct use of SummaryStatistics in one-way ANOVA. Fixed infinite loop when NaN occurs in singular value decomposition. Added the Lévy distribution. Normal distribution now uses a direct implementation of the inverse error function to compute inverse cumulative probability instead of relying on a numerical solver. This is much faster, more accurate and does not need convergence threshold. Implementations for inverse error function and inverse complementary error functions have been added. Extended ranges for FastMath performance tests. Finalized implementation of diagonal matrix. Added rank revealing QR decomposition. ArrayFieldVector can now be constructed from any FieldVector. Improved checking of null vector elements. Added utilities for prime numbers. Fixed generation of long random numbers between two bounds. Fixed creation of generic array. Check bounds in multi-start vector optimizers. Added discrete distributions. Fixed abstract test class naming that broke ant builds. Allow covariance to be computed for one-dimensional variables. Fixed accuracy of 3D Line.revert(). Improved javadoc to explain how switching functions should behave across events in ODE events detection. Added Hermite interpolator for RealFieldElement instances. Added RealFieldElement interface to represent anything that is real number like, implemented by both Decimal64, Dfp and DerivativeStructure. Added partial derivatives computation for 3D vectors and rotations. Fixed DerivativeStructure.atan2 for special cases when both arguments are +/-0. Added accurate linear combination of DerivativeStructure instances, avoiding cancellation. Throw "MathUnsupportedOperationException" from optimizers that do not support constraints (previous behaviour was to silently ignore the "SimpleBounds" argument). Added conversion of gradients and Hessians from spherical to Cartesian coordinates in 3D. Greater efficiency in "UnitSphereRandomVectorGenerator". Improved class javadoc wrt convergence criteria and added additional constructors to override the default epsilon and cut-off values in class "SimplexSolver". Fixed truncated value in "MultivariateNormalDistribution". Made "BitStreamGenerator" implement the "Serializable" interface. Added a (minimal) "DiagonalMatrix" implementation, such that the case of a large number of uncorrelated observations is handled efficiently. All contents of package "o.a.c.m.optimization" refactored into new packages "o.a.c.m.optimization" and "o.a.c.m.fitting". Added methods to EmpiricalDistribution to implement the RealDistribution interface. DBSCAN clustering algorithm (in package "o.a.c.m.stat.clustering"). Added element-by-element addition, subtraction, multiplication and division (in class "o.a.c.m.util.MathArrays"). Fixed "pow" method in class "FastMath". Created a "maximum number of iterations" stopping criterion in the convergence checkers (package "o.a.c.m.optimization") that allows the optimizers to return the "current best point" even if the convergence criteria are not met. Fixed overflow in "sinh" and "cosh" methods in class "FastMath". Accuracy improvements of Gamma.logGamma, and implementation of Gamma.gamma. Both new implementations are based on the NSWC Library of Mathematical Functions. New constructor in the custom checker classes (package "o.a.c.m.optimization") for passing the number of iterations after which the "convergence test" will return true. This allows an algorithm to return the best solution found (after the user-defined number of iterations) even if it does not meet the other convergence criteria. Use "NaNStrategy#FAILED" as default strategy in "NaturalRanking". Added a new "SynchronizedRandomGenerator" that wraps another "RandomGenerator" with all methods being synchronized, thus rendering the code thread-safe (at some efficiency cost). Add new "NaNStrategy": FAILED, used in "RankingAlgorithm" implementations. Any encountered input value that succeeds a "Double#isNaN" check, results in a "NotANumberException". Add new constructor to "SpearmansCorrelation" class which allows to specify the "RankingAlgorithm" to be used. Fixed naming inconsistencies between Interval and IntervalsSet classes. Added a method to check points in the Interval class, with a tolerance for boundary. Added G-test statistics. New "getSquareRoot" method in class "EigenDecomposition" (package "o.a.c.m.linear"). Added "isSymmetric" and "checkSymmetric" in "MatrixUtils" (package "o.a.c.m.linear"). Moved private array argument validation methods from ChiSquareTest to MathArrays. New class for generic multivariate mixture model distributions. Use getter/setter methods of super class for access to field "windowSize" in "ListUnivariateImpl". Improved construction of polygons with an additional constructor, more robust numerically. Added new methods "merge(Frequency)", "merge(Collection<Frequency>)", "incrementValue(Comparable<?>, long)" and "entrySetIterator()" to the "Frequency" class. Allow unlimited input values for "Dfp#multiply(int)". Added distance to point to 2D Line and Segment. "PowellOptimizer" (package "o.a.c.m.optimization.direct") uses "BrentOptimizer" as its internal line search optimizer. The fix forces the convergence criterion of "BrentOptimizer" to use function values (instead of domain values). Numerical accuracy problems arose in "CMAESOptimizer" (in package "o.a.c.m.optimization.direct") when large finite boundaries were specified, because the interval of allowed values was mapped to [0, 1]. This mapping was not necessary and its removal allows finite and infinite boundaries to be used together. Fixed some issues in nth root derivatives at 0. Fixed transformation to a Schur matrix for certain input matrices. Added matrix "block inversion" (in "o.a.c.m.linear.MatrixUtils"). "CMAESOptimizer": Solution was not constrained to lie within the provided boundaries. New "Quaternion" class (package "o.a.c.m.complex"). Added method to test for floating-point numbers equality with a relative tolerance (class "o.a.c.m.util.Precision"). Deprecated "FieldVector#getData()" in favor of "toArray()". Fixed an error in rectangular Cholesky decomposition. Clarified definition of isSupportXxxBoundInclusive in RealDistribution interface, made code consistent with the definition, and deprecated these methods, marking for removal in 4.0. Performance improvement in computation of the greatest common divisor (in class "o.a.c.m.util.ArithmeticUtils"). Added a check so that the returned point will always be the best one. Added a NewtonRaphsonSolver that uses the new differentiation package to define the function to solve. This class is intended to replace the former NewtonSolver which is deprecated. Added RandomDataGenerator to replace RandomDataImpl and deprecated RandomData interface and RandomDataImpl class. Deprecated nextInversionDeviate methods from RandomDataImpl class. Ensured that all nextXxx methods in RandomDataImpl/RandomDataGenerator use the configured RandomGenerator. Generate an exception for rare ill-conditioned cases in "HarmonicFitter" guessing procedure (package "o.a.c.m.optimization.fitting"). New interface for multivariate distributions. Added multivariate normal distribution. Added a utility method to compute Stirling numbers of the second kind. Added a new package dealing with differentials, for one or more free parameters and derivation order 1 or higher. Added additional crossover policies: "CycleCrossover", "NPointCrossover", "OrderedCrossover" and "UniformCrossover". Improved numerical stability of "SimplexSolver" by introducing Bland's rule to prevent cycling and a cutoff threshold to zero out very small values. Fixed overflow detection for negative values in constructor of class "Fraction". Fixed overflow in method "percentageValue" in class "Fraction". Raised (to 10) the default number of fractional digits to print out. Removed duplicate code. Added a new "RealMatrixFormat" class for input/output of RealMatrix instances. Default formatter instances for commons-math and octave have been added to "MatrixUtils". New "IterativeLegendreGaussIntegrator" that performs the same automatic subdivision of the integration interval as "LegendreGaussIntegrator", but uses the classes from package "o.a.c.m.analysis.integration.gauss" to perform the Gauss integration on the sub-interval. Deprecated "LegendreGaussIntegrator". Improve performance of quantile evaluation in "Percentile" class for cases with lots of equal values. New framework for Gauss integration schemes (in package "o.a.c.m.analysis.integration.gauss"). Gauss-Legendre quadrature rules (of unlimited order) implemented in double precision, and high precision (using "BigDecimal"). For all distribution classes (in package "o.a.c.m.distribution"), a new constructor takes a "RandomGenerator" parameter. The "RandomDataImpl" instance has been superseded by this RNG. All "sample()" methods have been modified to use this RNG instead of delegating to the methods in "RandomData". Added support for real asymmetric matrices to "EigenDecomposition". Re-instated methods to find all complex roots of a polynomial (class "LaguerreSolver" in package "o.a.c.m.analysis.solvers"). Added accessors to the "Pair" class (package "o.a.c.m.util"). Added new constructors in "EigenDecomposition" and deprecated two constructors with unused parameters. Added overridden method in "PolynomialFitter" (package "o.a.c.m.optimization.fitting") to limit the number of evaluations. Added a new constructor to o.a.c.m.utils.IterationManager, allowing for the specification of a callback function in case the maximum number of iteration is reached. A new HermiteInterpolator class allows interpolation of vector-valued functions using both values and derivatives of the function at sample points. Parameterized "CurveFitter" class (package "o.a.c.m.optimization.fitting") with the type of the fitting function. Updated subclasses "PolynomialFitter", "HarmonicFitter", "GaussianFitter". Fixed a problem when building rotations from two pairs of vectors. In very rare cases, due to numerical inaccuracies the computed quaternion was not normalized (some examples went as high as 1.0e8) and even after normalization, the quaternion was plain wrong. Removed unused fields LocalizedFormats.ALPHA and LocalizedFormats.BETA. This is an acceptable compatibility break, as these fields are only meant for internal use. Fix computation of upperCumulativeProbability in "HypergeometricDistribution" and cleanup of duplicate probability mass function. In GammaDistribution, deprecated getAlpha() and getBeta(). Replaced with getShape() and getScale(), respectively. Use inline computation for OrderedTuple hash code. Use modified Lentz-Thompson algorithm for continued fraction evaluation to avoid underflows. Fixed a wrong assumption on BSP tree attributes when boundary collapses to a too small polygon at a non-leaf node. Put serialization back for PointValuePair and PointVectorValuePair. Avoid superfluous null check when using iterators in RealVector and ArrayRealVector. Use epsilon instead of ulp in floating-point comparison when dropping columns after phase 1 in SimplexSolver. Added a workaround for an OpenJDK issue on sparc solaris with too small constants. Fixed ListPopulation#iterator to return an unmodifiable iterator. Cleanup of ListPopulation to consistently enforce the population limit. Use same range check in constructor for ElitisticListPopulation as in corresponding setter. Fixed unbalanced use of code tags in javadoc of several classes. Added class FixedElapsedTime (new StoppingCondition for evolution of generations) to genetics package. Added classes Decimal64 and Decimal64Field, which are wrapper classes around primitive doubles. These classes implement FieldElement and Field, respectively. Added statistical hypothesis tests "MannWhitneyUTest" and "WilcoxonSignedRankTest". Classes "CMAESOptimizer" and "BOBYQAOptimizer" inherit from "BaseAbstractMultivariateSimpleBoundsOptimizer" (in package "o.a.c.m.optimization.direct"). Added pre-computed arrays to speed up initial loading time for FastMath. Resources for error messages translations have been moved out of META-INF folder in the jar, to avoid interferences with some build systems. Fixed "doubleValue" and "floatValue" method in "BigFraction" when numerator and denominator are larger than the range of the corresponding primitive type. Removed "MathException" (from package "o.a.c.math"). Removed "MathRuntimeException" (from package "o.a.c.math"). Merged interface and implementation of statistical tests in o.a.c.m.stat.inference package. Merged interface and implementation of EmpiricalDistribution. Relaxed test for equality in UnivariateStatisticAbstractTest. Modified the genetics package to use localized exception messages. Fixed a faulty test for zero in TridiagonalTransformer. Changed algorithm in computation of the covariance matrix in "AbstractLeastSquares" (package "optimization.general"), from "LUDecomposition" to "QRDecomposition". Fixed rounding error in RandomDataImpl nextInt, nextLong methods causing lower endpoints to be excluded when negative. Also improved robustness of nextUniform for extreme values and changed its contract to throw IAE when provided bounds are infinite or NaN. Fixed "offset by one" bug in "BOBYQAOptimizer". Check first step size in embedded Runge-Kutta integrators, and truncate it if needed. Modified setSeed methods in Bitstream generators (MersenneTwister and Well generators) to clear the cache of normal deviates used by nextGaussian. Fixed bracketing interval balancing in BracketingNthOrderBrentSolver. Removed unused or duplicate utility methods from "MathUtils". Math functions with "double" arguments were moved to class "FastMath". Broke up bloated "MathUtils" class into "MathArrays", "Precision", "ArithmeticUtils" classes. Fixed array indexing error in Variance evaluate method for computing the weighted variance of an array segment. Fixed case of unconstrained variables that still occur in the objective function in simplex solver. The fast cryptographically secure pseudorandom number generator ISAAC has been added. The reset method in StepHandler interface has been renamed init and is provided more information on the integration by the calling integrator. A similar init method has been added to the EventHandler interface. Improved accuracy of Runge-Kutta based step interpolators near step start. Fixed errors in SummaryStatistics addValue causing variance, mean, or geometric mean statistics not to be updated if they have been overridden using instances of commons-math supplied implementations. Removed First, Third, Fourth moments from the public API. These internally used statistics have non-standard definitions. The classes remain, but now have package scope. Added support for population variance in StatUtils, SummaryStatistics and DescriptiveStatistics and clarified javadoc to make it clear that 'variance' means sample variance. Fixed BigFraction percentage method which did not work at all. Added interface and abstract class for supporting optimizers classes that can take simple constraints into account. Fixed a bad interaction between step handlers and event handlers in ODE integrators. Added array constructor and getter for Vector2D and Vector3D. Added applyTo and applyInverseTo methods in the Rotation class that handle directly arrays instead of Vector3D instances. Added adapters for simple bound constraints optimization that can be used for all direct optimization methods, including the ones that do not support constraints by themselves. CMA-ES optimizer input sigma is now consistent with boundaries range units. Added stable random generator based on Chambers-Mallows-Stuck method. Changed the default seed used for RandomDataImpl, AbstractWell and MersenneTwister PRNGs to add the system identity hash code of the instance to the current system time, so generators initialized with default seeds within system clock resolution will generate different sequences. Changed the default non-secure generator used by RandomDataImpl to Well19937c. Fixed an event resetting issue in ODE. Default implementation for "addToEntry" and "multiplyEntry" in "AbstractRealMatrix". Method "addToEntry" in "RealVector". Replaced temporary matrices and entry mutators with double[][] arrays to speed computation in loops within QRDecomposition, Bi- and TriDiagonalTransformer implementations. Fixed an integer overflow in OpenMapRealMatrix. "FastMath": Use constant fields instead of recomputing them at method call. Added Jacobi polynomials. Added "shift" method to compute the coefficients of a new polynomial whose values are the same as those of another polynomial but computed at a shifted point. Faster "multiply" method in "Array2DRowRealMatrix". Code inspired from the Jama project. Replaced package.html with package-info.java for package documentation. Added a getRuntimeClass method to the Field interface allowing to use a complete hierarchy of fields sharing a common interface. The last remaining uses of OptimizationException have been replaced by unchecked exceptions (UnboundSolutionException, NoFeasibleSolutionException, MaxCountExceededException ...) The checked ConvergenceException has been replaced by an unchecked ConvergenceException. ODE step interpolation with Jacobians is now fully merged with classical step interpolation. Completely revamped the computation of Jacobians in ODE. This computation is now included in the mainstream class hierarchy, not in a separate package anymore, and it allows adding other types of equations to a main ODE, not only variational equations for Jacobians computation. SimpleRegression implements UpdatingMultipleLinearRegression interface. Added isMonotone methods in MathUtils. Optimized checkOrder method. In class "AbstractLeastSquaresOptimizer": Allow to specify a singularity threshold in call to "getCovariances" method. Added the ability to suppress the estimation of the intercept in SimpleRegression. Dead code in FastMath.pow(double, double) and some improvement in test coverage. Removed "getData()" method from "RealVector" as it was redundant with "toArray()". Removed completely MathUserException. Use the refactored exceptions framework for ODE. Added a getter to allow retrieving the exception related to an exception context provider. Added erf(double,double) to Erf and used this to improve tail probability accuracy in NormalDistributionImpl. Enabled reseeding of the random generators used by EmpiricalDistributionImpl and ValueServer. Modified ValueServer to pass its RandomData instance to the EmpiricalDistributionImpl that it creates when used in DIGEST_MODE, so reseeding ValueServer works as expected. Renamed "AbstractRealVector" to "RealVector". The interface was removed in favour of its unique (abstract) implementation. Also removed several methods with double[] arguments from AbstractRealVector. Unmodifiable view of a "RealVector". Refactored integration API for consistency with solvers API. Now the main convergence parameters are set in the constructor and remain fixed. Added a maximal number of function evaluations to the integration method, similar to what is done in the solvers API. Added storeless covariance implementation. Eliminated extraneous constructor from SimpleRegression. Eliminated pluggability of ChiSquaredDistribution used by ChiSquaredDistributionTest. Made RandomGenerator configurable and reseedable in EmpiricalDistributionImpl. Added a 3D SubLine class. Fixed exceptions generated by "ebeMultiply" and "ebeDivide" in "OpenMapRealVector". In "SingularValueDecompositionImpl", added accessor for the inverse of the condition number. Made pseudo-inverse consistent with rank computation in SingularValueDecompositionImpl. Added methods to solve upper and lower triangular systems to MatrixUtils. Improved performance of nextInt(int) in BitsStreamGenerator. Fixed a wrong detection of rotation axis versus vectors plane in Rotation constructor using two vectors pairs. Added a few linearCombination utility methods in MathUtils to compute accurately linear combinations a1.b1 + a2.b2 + ... + an.bn taking great care to compensate for cancellation effects. This both improves and simplify several methods in euclidean geometry classes, including linear constructors, dot product and cross product. Fixed bugs in AbstractRandomGenerator nextInt() and nextLong() default implementations. Prior to the fix for this issue, these methods generated only positive values. Simple benchmark utility (new class "PerfTestUtils" added to test sources in src/test). Added a solver for Dfp-based (i.e. high accuracy) functions. Added a Brent-like solver that has higher (user specified) order and does bracket selection on the result: BracketingNthOrderBrentSolver. Added a few shortcut methods and predicates to Dfp (abs, isZero, negativeOrNull, strictlyNegative, positiveOrNull, strictlyPositive). "AbstractRealMatrix" inherits from "RealLinearOperator". Linear combination of vectors: "RealVector" interface updated, implemented in "AbstractRealVector" and "ArrayRealVector". Slightly more efficient implementation of basic operations in "ArrayRealVector". Overloaded methods (add, subtract, multiply, divide) to take a "double" parameter (as a complex number with zero imaginary part). Code and Javadoc cleanup. Added "valueOf" methods. Implemented faster generation of random gamma distributed values with algorithm from Ahrens and Dieter (1972) for shape < 1 and Marsaglia and Tsang (2001) otherwise. Allow discrete events to be detected by ODE solvers also at step start. Rewritten SVD decomposition based on JAMA code. Complex add javadoc says that if either addend has NaN parts, the result should be Complex.NaN. Prior to the fix for this issue, NaNs were propagated only in real and imaginary parts individually. Framework for iterative linear solvers. Improved efficiency in RandomDataImpl, LaguerreSolver, FastMath and OutlineExtractor by moving conditional code into blocks where it is needed. Prevent step normalizer to output twice the last point in MULTIPLES mode. Removed the requiresDenseOutput method from the StepHandler interface. Now integrators always consider dense output is required and set up the appropriate state interpolators, so step handlers can rely on them. Modified "SecantSolver" to comply with the original algorithm. Added several secant-based solvers. Added a way to select the side of the root with bracketing solvers. Fixed javadoc for ODEIntegrator interface Extended StepNormalizer with normalization mode and bounds settings. Implemented faster generation of random exponential distributed values with algorithm from Ahrens and Dieter (1972): Computer methods for sampling from the exponential and normal distributions. K-means++ clustering can now run multiple trials Added a way to compute sub-lines intersections, considering sub-lines either as open sets or closed sets Added a way to build a sub-line from its endpoints, and to retrieve the endpoints from a sub-line Javadoc fixes in ODE. Added a way to specify a custom root solver to find events in ODE integration. Fixed error in javadoc describing Integer distribution inverse cumulative probability API. Fixed error in javadoc describing the behavior of the Percentile algorithm for small percentiles in small datasets. New "filter" package. Initial implementation of Kalman filter. Improved k-means++ clustering performances and initial cluster center choice. Fixed tricube function implementation in Loess interpolator. Fixed documentation of statistics examples. Improved documentation of general optimization with a thorough example. Replaced NullPointerException by NullArgumentException. Added a consistent classes hierarchy for Euclidean spaces in dimension 1, 2 and 3. Improved javadoc for FastMath explaining the overhead at class loading and the targeted use cases. Allow outer product of vectors of different sizes. A complete generic implementation of Binary Space Partitioning Trees (BSP trees) has been added. A few specializations of this implementation are also provided for 1D, 2D and 3D Euclidean geometry. This allows support for arbitrary intervals sets (1D), polygons sets (2D) and polyhedrons sets (3D) with all sets operations (union, intersection, symmetric difference, difference, complement), with predicates (point inside/outside/on boundary, emptiness, other region contained), with geometrical computation (barycenter, size, boundary size) and with conversions from and to boundary representation. Avoid some array copying in add and subtract ArrayFieldVector. Fixed an unused constructor parameter in ArrayFieldVector. Created an "ExceptionContext" class: It provides the customization feature of "MathRuntimeException" without imposing a singly rooted hierarchy of the Comons Math exceptions. Thus, those exceptions now inherit from their Java standard counterparts (e.g. "MathIllegalArgumentException" inherits from "IllegalArgumentException"). Fixed conversion problems to/from 0 in Decimal Floating Point (Dfp) class. Fixed initialization of multistep ODE integrators. Relying on the interpolation model of the starter integrator inside only one step was wrong. The model may have a too low order to compute high degrees derivatives in the Nordsieck vector. Now we use several steps and use only grid points instead of interpolated points. Added solve methods using double[][] to linear algebra decomposition solvers. Added an interpolator adapter for data with known period. Added a "rectangular" Cholesky decomposition for positive semidefinite matrices. Added setters allowing to change the step size control parameters of adaptive step size ODE integrators. Added a compareTo method to MathUtils that uses a number of ulps as a tolerance error, and works well on all numbers, including normals, subnormals, signed zeroes, infinities and NaNs. Fixed two errors in simplex solver when entries are close together or when variables are not restricted to non-negative. Improved robustness of k-means++ algorithm, by tracking changes in points assignments to clusters. Changed MathUtils.round(double,int,int) to propagate rather than wrap runtime exceptions. Instead of MathRuntimeException, this method now throws IllegalArgumentException or ArithmeticException under the conditions specified in the javadoc. Reduced cancellation errors in Vector3D.crossProduct Fixed bug in "MultidimensionalCounter". All unit tests have been converted to Junit 4. They need at least Junit 4.5 to run (the ant and maven build systems are currently set to use Junit 4.8.2) Removed the ConvergingAlgorithm interface and ConvergingAlgorithmImpl class Added a consistency check for number of points with respect to the number of clusters in Kmeans++ clustering Added two sided Kolmogorov-Smirnov distribution using modified Marsaglia et al. (2003) implementation and quick decisions for certain parameter areas according to Simard et al. (2011). Added "power" method in "RealMatrix" and "FieldMatrix<T>" interfaces and their default implementations in "AbstractRealMatrix" and "AbstractFieldMatrix". Added "cosine" method in "RealVector" interface and default implementation in "AbstractRealVector". Fixed bug in "KMeansPlusPlusClusterer". All exceptions defined in Commons Math provide a context and a compound message list. Refactored "PolynomialFitter" (in package "optimization.fitting"). Added parametric function in "PolynomialFunction" (in package "analysis.polynomials"). Removed "HarmonicFunction" (in package "optimization.fitting"); superseded by class "HarmonicOscillator" (in package "analysis.function"). Refactored "HarmonicFitter" (in package "optimization.fitting"). "HarmonicCoefficientsGuesser" removed. Removed "GaussianFunction" and "GaussianDerivativeFunction" (in package "optimization.fitting"); functionality moved to class "Gaussian" (in package "analysis.function"). Removed "ParametricGaussianFunction" (in package "optimization.fitting"); functionality moved to class "Gaussian" (in package "analysis.function"). Refactored "GaussianFitter" (in package "optimization.fitting"). The class now really fits a Gaussian function (whereas previously it was fitting the sum of a constant and a Gaussian). Implementation of the CMA-ES optimization algorithm. The interface "ParametricRealFunction" (in package "optimization.fitting") has been renamed to "ParametricUnivariateRealFunction" and moved to package "analysis". TestUtils is thread-hostile. Remove getters and setters, and make static variables final. Create FastMath copySign methods FastMath atan2 does not agree with StrictMath for special cases Removed checked "MaxIterationsExceededException" (superseded by "MaxCountExceededException" from package "exception"). Removed checked "DimensionMismatchException". Replaced all occurrences by its equivalent from package "exception". FastMath acos fails when input abs value is less than about 5.7851920321187236E-300 - returns NaN FastMath toRadian and toDegree don't handle large double numbers well FastMath does not handle all special cases correctly Fix ulp(Infinity) to return Infinity rather than NaN FastMath.signum(-0.0) does not agree with Math.signum(-0.0) FastMath is not an exact replacement for StrictMath (partially fixed) Add signum(float), ulp(float) FastMath.max(50.0f, -50.0f) => -50.0f; should be +50.0f Fixed FastMath.max(float, float) so it returns correct value. MATH-491 MathUtils.equals(double, double) does not work properly for floats - add equivalent (float, float) methods and basic tests Removed "MathException" from the "throws" clause of the "interpolate" method of the interpolators interfaces (package "analysis.interpolation"). In order to comply with the new runtime exceptions policy, the classes "RealVectorFormat", "ComplexFormat", "Vector3DFormat" and "CompositeFormat" do not inherit anymore from the Java standard "Format" class. Failed parsing will result in the throwing of a "MathParseException". "CompositeFormat" is now a utility class ("private" constructor). By policy, all Commons Math exceptions must inherit from class "MathRuntimeException". For optimizers (package "optimization"), the number of allowed function evaluations is passed as a parameter to the "optimize" method. For solvers (package "analysis.solvers"), the number of allowed function evaluations is passed as a parameter to the "solve" method. Created a "MathRuntimeException" to serve as a base class for exception types that need to wrap another (lower-level) exception. Replaced "ComposableFunction" and "BinaryFunction" (in package "analysis") by a set of utilities in the new class "FunctionUtils" together with independent function objects in the new "analysis.function" package. Removed redundant "mapXxx" and "mapXxxToSelf" methods in "RealVector" and "AbstractRealVector" (in package "linear"). Refactoring of the "analysis.solvers" package. Removed the ode.jacobians package. Removed classes "FunctionEvaluationException", "MatrixVisitorException" and "DerivativeException" (superseded by the new "MathUserException"). Created a generic "Pair" class to replace the "AbstractMap.SimpleEntry" that is only available in Java 6 and later. Class "DirectSearchOptimizer" (and subclasses "NelderMead" and "MultiDirectional") was refactored into new classes: "SimplexOptimizer" and "AbstractSimplex" (and subclasses "NelderMeadSimplex" and "MultiDirectionalSimplex"). The old classes were deprecated and removed. Created "MatrixDimensionMismatchException" to replace "InvalidMatrixException" (when the latter is used to signal that matrices are not compatible for some operation). Replaced "MatrixIndexException" with "OutOfRangeException" (when the former is used to signal a row or column dimension mismatch). Made "sample" methods part of the "IntegerDistribution" and "ContinuousDistribution" interfaces. All distribution classes (in package "distribution") are immutable. Created an unchecked "FunctionEvaluationException". Modified the "UnivariateRealFunction" interface: Removed the checked "FunctionEvaluationException" from the signature of the "value" method. Modified semantics: "equals" methods now consider that NaNs are not equal (compliant with IEEE754). Also, two adjacent floating point numbers are considered equal (this is consistent with the fact that all real numbers between them can be represented by either of the two). One consequence of that is that "equals" is not transitive. Removed methods referring to the concept of "iteration". Removed interface methods to access the number of evaluations of the gradient and Jacobian. Added new "Incrementor" utility to be used as a bounded counter for objective function evaluations. Removed all references to "OptimizationException" (replaced by "ConvergenceException"). Modified "AbstractUnivariateRealOptimizer" to make it more similar to "BaseAbstractScalarOptimizer". Added utility methods in "ConvergingAlgorithmImpl". Refactoring of some classes in package "optimization.general" to remove code duplication and to allow the implementation of optimization algorithms that do not use derivatives. Created interface "BaseMultivariateRealOptimizer". Created classes "BaseAbstractScalarOptimizer" and "AbstractScalarOptimizer". "MultivariateRealOptimizer" and "DifferentiableMultivariateRealOptimizer" both extend "BaseMultivariateRealOptimizer". "AbstractScalarOptimizer" extends "BaseAbstractScalarOptimizer" and "AbstractScalarDifferentiableOptimizer" inherits from "AbstractScalarOptimizer". FastMath is not an exact replacement for StrictMath (partially fixed) added scalb(double, int), scalb(float, int) FastMath is not an exact replacement for StrictMath (partially fixed) added hypot(double, double), nextAfter(double, double) and nextAfter(float,double) (beware of the strange double second argument) so that they handle special values in the way as StrictMath FastMath is not an exact replacement for StrictMath (partially fixed) added getExponent(double) and getExponent(float) FastMath is not an exact replacement for StrictMath (partially fixed) Add copySign(double), copySign(float) separate discrete event detection from adaptive step size handling in ODE solvers, thus improving robustness, maintainability and speed Fixed an awkward statement that triggered a false positive warning. Added complementary error function, erfc. Modified erf (and erfc) to return extreme values for x with abs(x) > 40. For these arguments, the true value is indistinguishable from an extrema as a double. Added characteristic support to distributions, including methods to return numerical estimates of the mean and variance and upper and lower bounds of support. In version 2.2, methods returning distribution characteristics have been added only to the implementation classes. In version 3, supporting methods have been added to the abstract base classes and distribution interfaces. Added a constructor and addValues(double[]) methods allowing DescriptiveStatistics to be initialized with values from a double[] array. Similarly enhanced ResizeableDoubleArray. Added a getUniqueCount() method to Frequency to return the number of unique values included in the frequency table. Modified NormalDistributionImpl.cumulativeProbability to return 0 or 1, respectively for values more than 40 standard deviations from the mean. For these values, the actual probability is indistinguishable from 0 or 1 as a double. Top coding improves performance for extreme values and prevents convergence exceptions. Added toString() override to StatisticalSummaryValues. Deprecated the whole ode.jacobians package. It is clumsy and difficult to use. It will be replaced by a completely rewritten implementation in 3.0, which will be more tightly bound to the top level ode package Added a normalization feature to transform samples so they have zero mean and unit standard deviation Created "MathUserException" class to convey cause of failure between layers of user code separated by a layer of Commons Math code. Deprecated classes "FunctionEvaluationException", "MatrixVisitorException" and "DerivativeException". Fixed k-means++ to add several strategies to deal with empty clusters that may appear during iterations. Improved Percentile performance by using a selection algorithm instead of a complete sort, and by allowing caching data array and pivots when several different percentiles are desired. Fixed an error preventing zero length vectors to be built by some constructors. Fixed an error preventing ODE solvers to be restarted after they have been stopped by a discrete event. Added new random number generators from the Well Equidistributed Long-period Linear (WELL). Made intercept / no intercept configurable in multiple regression classes. By default, regression models are estimated with an intercept term. When the "noIntercept" property is set to true, regression models are estimated without intercepts. Fixed lost cause in MathRuntimeException.createInternalError. Note that the message is still the default message for internal errors asking to report a bug to Commons Math JIRA tracker. In order to retrieve the message from the root cause, one has to get the cause itself by getCause(). Modified multiple regression newSample methods to ensure that by default in all cases, regression models are estimated with intercept terms. Prior to the fix for this issue, newXSampleData(double[][]), newSampleData(double[], double[][]) and newSampleData(double[], double[][], double[][]) all required columns of "1's" to be inserted into the x[][] arrays to create a model with an intercept term; while newSampleData(double[], int, int) created a model including an intercept term without requiring the unitary column. All methods have been changed to eliminate the need for users to add unitary columns to specify regression models. Users of OLSMultipleLinearRegression or GLSMultipleLinearRegression versions 2.0 or 2.1 should either verify that their code either does not use the first set of data loading methods above or set the noIntercept property on estimated models to get the previous behavior. Added the dfp library providing arbitrary precision floating point computation in the spirit of IEEE 854-1987 (not exactly as it uses base 1000 instead of base 10). In addition to finite numbers, infinities and NaNs are available (but there are no subnormals). All IEEE 854-1987 rounding modes and signaling flags are supported. The available operations are +, -, *, / and the available functions are sqrt, sin, cos, tan, asin, acos, atan, exp, log. Added faster and more accurate version of traditional mathematical functions in a FastMath class intended to be a drop-in replacement for java.util.Math at source-level. Some functions still directly delegates to Math but this will improve with time. Some functions like exp may be twice as fast (even 3 times faster on some processors). Sine, cosine or power functions show typical speedups of 1.5 times faster or more. Added R-squared and adjusted R-squared statistics to OLSMultipleLinearRegression. Corrected the formula used for Y variance returned by calculateYVariance and associated methods in multiple regression classes (AbstractMultipleLinearRegression, OLSMultipleLinearRegression, GLSMultipleLinearRegression). These methods previously returned estimates of the variance in the model error term. New "calulateErrorVariance" methods have been added to compute what was previously returned by calculateYVariance. Bug fixed in Levenberg-Marquardt (handling of weights). Bug fixed in Levenberg-Marquardt (consistency of current). Bug fixed in chi-square computation in AbstractLeastSquaresOptimizer. Added support for Gaussian curve fitting. Fixed several bugs in "BrentOptimizer". Fixed inconsistency in return values in "MultiStartUnivariateRealOptimizer". Added a feature allowing error estimation to be computed only on a subset of Ordinary Differential Equations, considered as the main set, the remaining equations being considered only as an extension set that should not influence the ODE integration algorithm Fixed bug in precondition check (method "setMicrosphereElements"). Created "MultidimensionalCounter" class. Created package "exception" to contain the new exceptions hierarchy. Created package "exception.util": utilities for the exception classes (e.g. managing the localization of error messages). Default policy for dealing with invalid null references: raise a "NullArgumentException" (subclass of "IllegalArgumentException"). Implementation of linear interpolation. Improved localization of error messages. Allow multiple optimizations with a default simplex. Added new "equalsIncludingNaN" methods that have the same semantics as the old "equals" methods. These are deprecated, and their semantics will be modified (in the next major release) such that NaNs are not considered equal (to be more compliant with IEEE754). Added a setQRRankingThreshold method to Levenberg-Marquardt optimizer to improve robustness of rank determination. Added random data generation methods to RandomDataImpl for the remaining distributions in the distributions package. Added a generic nextInversionDeviate method that takes a discrete or continuous distribution as argument and generates a random deviate from the distribution. Also added sampling methods based on the implementations in RandomDataImpl to distributions. Fixed Levenberg-Marquardt optimizer that did not use the vectorial convergence checker. Now this optimizer can use either the general vectorial convergence checker or its own specialized convergence settings. Fixed loss of significance error in PersonsCorrelation p-value computation causing p-values smaller than the machine epsilon (~1E-16) to be reported as 0. Fix NullPointerException in BisectionSolver.solve(f, min, max, initial) Fix spelling of getSparcity [sic] method of OpenMapRealVector Fix problem with the default sparseIterator when a RealVector has exactly one non-zero entry Implementation of tricubic interpolation. Deprecated SmoothingBicubicSplineInterpolator and SmoothingBicubicSplineInterpolatorTest. Added BicubicSplineInterpolator and BicubicSplineInterpolatorTest. Added SmoothingPolynomialBicubicSplineInterpolator and SmoothingPolynomialBicubicSplineInterpolatorTest. Added method to clear the list of observations in PolynomialFitter. Fix use of wrong variable in SmoothingBicubicSplineInterpolatorTest.testPreconditions() Added method to clear the list of observations in CurveFitter. Implementation of bicubic interpolation. Added density functions to remaining continuous distributions (F, T, Weibull, Cauchy). As of Math 2.1, all continuous distributions implement density functions. The HasDensity interface has been deprecated and in version 3.0, density(double) will be added to the ContinuousDistribution interface. Changed equals() methods to use instanceof check rather than catching ClassCastException; this also allows some null checks to be omitted. Removed unnecessary null checks in equals methods. Fraction.hashCode() implementation was not fully consistent with Fraction.equals(). Changed hashCode() to use fields directly to agree with equals(). Resolved multiple problems leading to inaccuracy and/or failure to compute Normal, ChiSquare and Poisson probabilities, Erf and Gamma functions. Made Brent solver absolute accuracy configurable for all continuous distributions. Fixed too stringent interval check in Brent solver: initial guess is now allowed to be at either interval end Added a way to compute both the final state in an Initial Value Problem (IVP) for Ordinary Differential Equations (ODE) and its derivatives with respect to initial state and with respect to some problem parameters. This allows wrapping ODE solvers into optimization or root finding algorithms, which in turn can be used to solve Boundary Value Problems (BVP). There are no implementations (yet) of BVP solvers in the library. Fixed an error in events handling in ODE solvers. In some rare cases, events occurring close to a step start were handled without truncating the step, making them appear as is they occurred close to the step end Fixed a problem with getInterpolatedDerivatives returning zero derivatives when an ODE step handler is configured to not use interpolation. It now returns a constant but non-zero value consistent with at least one point inside the step Fixed wrong return values when enpoints are roots in Brent solver with a user provided initial guess Fixed a missing bracketing check of initial interval in Brent solver. In SVD, the matrices passed to EigenDecomposition are now symmetric by construction (rather than simply by definition). In EigenDecomposition, once the tridiagonal form is obtained, the non-significant elements are set to 0. A EigenDecompositionImpl simplified makes it possible to compute the SVD of a singular matrix (with the right number of elements in the diagonal matrix) or a matrix with singular value(s) of multiplicity greater than 1. Added SemiVariance statistic. Added a warning in the getCoefficients method documentation for PolynomialFunctionLagrangeForm. Computation may be ill-conditioned so this method should be used with care. Fixed an error in BigFraction multiplication for large numerators that don't fit in a primitive int. Fixed a spurious exception in EigenDecompositionImpl when a 3x3 block had two identical eigenvalues. Added min/max getters for real vectors (not yet in the RealVector interface for compatibility purposes, but in the AbstractRealVector abstract class). Fixed automatic step initialization in embedded Runge-Kutta integrators. The relative tolerance setting was never used, only the absolute tolerance was used. Fixed regression in Frequency.getPct(Object) introduced in 2.0. Cumulative percent was being returned for Object arguments in place of percent. Singular Value Decomposition now computes either the compact SVD (using only positive singular values) or truncated SVD (using a user-specified maximal number of singular values). Fixed Singular Value Decomposition solving of singular systems. Added MathUtils methods to compute gcd and lcm for long arguments. Added support for weighted univariate statistics. Fixed a wrong implementation of the Linf norm in vectors. Fixed a convergence discrepancy with respect to theory in Gragg-Bulirsch-Stoer integrator. Fixed a wrong dimension check in SVD solver. Added composition features for real functions. Added mapping and iteration methods to vectors. Provided a default implementation for the numerous simple methods in the RealVectorInterface. Fixed an error in handling very close events in ODE integration. Fixed an overflow error in MathUtils.distance that was causing KMeansPlusPlusClusterer to fail with a NullPointerException when component distances between points exceeded Integer.MAXVALUE. Added generationsEvolved property to GeneticAlgorithm to track the number of generations evolved by the evolve() method before reaching the StoppingCondition. Fixed an index computation error in eigen decomposition. Once again, kudos to Dimitri for debugging this. Fixed an ArrayIndexOutOfBoundsException in eigen decomposition. Kudos to Dimitri for debugging this, it was really difficult. Fixed parameter test in RandomDataImpl#nextExponential. The method now throws IllegalArgumentException for mean = 0. Changed probability calculations for Binomial, Poisson, and Hypergeometric distributions to use Catherine Loader's saddle point approximations. Removed dead code from Complex#divide. Fixed implementation of RandomDataImpl#nextPoisson by implementing an alternative algorithm for large means. Added support for multidimensional interpolation using the robust microsphere algorithm. Fixed implementation of EmpiricalDistributionImpl#getUpperBounds to match interface contract. Added getGeneratorUpperBounds method to EmpiricalDistributionImpl providing previous behavior. Fixed wrong results on Loess interpolation, also added a way to set weights for smoothing and to ignore zero weights for coefficients computation Fixed a OutOfBoundException in simplex solver when some constraints are tight. Fixed misleading number formats in error messages for adaptive stepsize integrators. Added support for weighted descriptive statistics. Added normalizeArray method to MathUtils. Fixed a NullPointerException in simplex solver when no solution is possible and some constraints are negative. Removed an unused argument in a private method in simplex solver. Fixed an error induced by entries set to 0 in simplex solver. Fixed an error leading the simplex solver to compute the right solution but return another one. Prevent infinite loops in multi-directional direct optimization method when the start point is exactly at the optimal point. Prevent possible zero divides on eigenvectors of indefinite matrices Fixed an error in RealMatrix javadoc Added an implementation of the Mersenne twister pseudo random number generator from Makoto Matsumoto and Takuji Nishimura Changed the return type of the various interpolation algorithms to the specific implementation of UnivariateRealFunction each one uses The behavior of the bracket method in UnivariateRealSolverUtils has been changed to return successfully when a tentative bracketing interval has a root exactly at one of its end points. Previously, such intervals triggered an exception. Added a check for too few rows with respect to the number of predictors in linear regression Added a getCovariance method to singular value decomposition Added robust locally weighted regression (Loess). Added a scalar multiply to the Complex class Added curve fitting with a general case and two specific cases (polynomial and harmonic). Optimized Complex isNaN(), isInfinite() by moving computation to constructor. Added Genetic Algorithm implementation. Fixed detection of not positive definite matrices in Cholesky decomposition Fixed a wrong check for basic variables Fixed a problem when setting some variables (several variables were set instead of only one) Added a way to limit the number of functions evaluations in optimizers (the number of iterations could already be limited) Added digamma function. Added Spearman's rank correlation (SpearmansCorrelation). Added support for rank transformations. Completed internationalization of all error messages Added a clustering package with an implementation of the k-means++ algorithm Added distance1, distance and distanceInf utility methods for double and int arrays in MathUtils Added an utility equality method between double numbers using tolerance in ulps (Units in Last Position) Added getNorm1, getNormInf, distance1 and distanceInf to the Vector3D class Added support for any type of field in linear algebra (FielxMatrix, FieldVector, FieldLUDecomposition) The RealMatrixImpl implementation classes has been renamed Array2DRowRealMatrix to reflect its specificities and for consistency with the new implementations. The previous name is still available but is deprecated Added a block-based storage type for dense matrices improving speed for large dimensions Added AggregateSummaryStatistics class to support aggregation of SummaryStatistics. Added general Field and FieldElement interfaces to allow generic algorithms to operate on fields. The library already provides several implementations: Complex, Fraction, BigFraction and BigReal Fixed inconsistent access to multidimensional array in FastFourierTransformer Greatly improved multiplication speed for sparse matrices Fixed threading issues with MathException and MathRuntimeException Fixed threading issues with UnivariateRealSolverUtils factory Reduced visibility of MessagesResources_fr.contents field to private Added Fraction.toString() Added add/subtract/multiply/divide functions with integer parameters to Fraction Added some utility functions to compute powers with integral types (int, long, BigInteger). Fixed a comparison error when two different fractions evaluate to the same double due to limited precision. Added a BigFraction class that does not overflow when big numerators or denominators are used. Added an optimizer for constrained linear problems based on 2-phases standard simplex. Redesigned the optimization framework for a simpler yet more powerful API. Added non-linear conjugate gradient optimizer. Fixed an error in computing gcd and lcm for some extreme values at integer range boundaries. Added a MathUtils method to check equality given some error bounds. Added PearsonsCorrelation class to compute correlation matrices, standard errors and p-values for correlation coefficients. Added Covariance class to compute variance-covariance matrices in new correlation package. Improved fast Fourier transform efficiency. Added a SparseRealVector class that implements a sparse vector for the RealVector interface. Added factory methods to create Chebyshev, Hermite, Laguerre and Legendre polynomials. Added add, subtract, negate, multiply and toString methods to PolynomialFunction. Changed FractionFormat to extend NumberFormat. Forced symmetry in binomialCoefficientLog and added test cases for MathUtils. Fixed error in binomial coefficient computation. Added a Legendre-Gauss integrator. Fixed error in factorial computation for 17 <= n <= 20. Integration algorithms now can have both relative and absolute accuracy settings. Added a new univariate sub-package below the optimization package. The analysis package has been reorganized with several sub-packages. Fixed an error in gcd computation for large values. Added method to walk matrix entries with or without changing them in the visitor design pattern sense. Three different orders can be used, row by row, column by column or optimized order according to internal storage. Optimized order should be preferred when no specific order is needed, because it will be more cache efficient. Added Fast Hadamard Transform. Added nth root computation for complex numbers. Added support for sparse matrix. Added an int/double hash map (OpenIntToDoubleHashMap) with much smaller memory overhead than standard java.util.Map (open addressing and no boxing). Added support for multi-dimensional Fourier transform. The root solvers and the integrators now take the function to solve as a parameter to the solve/integrate methods, thus allowing to reuse the same solver/integrator for different functions. Added setter methods for rows and columns in matrices. Added Frobenius matrix norm. Added an abstract matrix implementation simplifying extension by users. Added support for the Zipf distribution. Added support for copying statistics. Changes to stats classes include copy constructor, static copy(-,-) and instance copy() methods. Added copy() to UnivariateStatistic and StorelessUnivariateStatistic interfaces. Added a removal feature for observations in descriptive statistics. Added a scalb method in MathUtils. This method is similar to the method with same name added in java.lang.Math as of Java 6. Fixed F distribution inverse CDF computation for small denominator degrees of freedom. Fixed an error in CorrelatedRandomVectorGenerator leading to a component of the generated vector being constant. Greatly improved QR-decomposition speed using transposed matrices internally. Fixed an infinite loop encountered in some backward integration cases for ODE solvers. Added beta distribution. Added probability density functions computation for distributions for which it is feasible. Changed the Complex.equals() method so that it considers +0 and -0 are equal, as required by IEEE-754 standard. Added JAMA-like interfaces for eigen/singular problems. The implementation are based on the very quick dqd/dqds algorithms and some parts of the MRRR algorithm. This leads to very fast and accurate solutions. Added JAMA-like interfaces for decomposition algorithms. These interfaces decompose a matrix as a product of several other matrices with predefined properties and shapes depending on the algorithm. These algorithms allow to solve the equation A * X = B, either for an exact linear solution (LU-decomposition, Cholesky decomposition) or an exact or least-squares solution (QR-decomposition). Added removeData methods for the SimpleRegression class. This allows to support regression calculations across a sliding window of (time-based) observations without having to recalculate for the entire window every time. Support for one dimensional vectors has been added to the linear algebra package with a RealVector interface, a RealVectorImpl default implementation using a single double array to store elements and a RealVectorFormat for input/output. Changed OLS regression implementation added in MATH-203 to use QR decomposition to solve the normal equations. New ODE integrators have been added: the explicit Adams-Bashforth and implicit Adams-Moulton multistep methods. As the implementations of these methods are based on Nordsieck vector rather than a traditional array of previous steps, they both have been improved to handle adaptive stepsize. These methods provide the same rich features has the existing ones: continuous output, step handlers, discrete events, G-stop ... Replaced size adjustment of all steps of fixed steps Runge-Kutta integrators by a truncation of the last step only. The ODE integrators now support several step handlers at once, instead of just one. This is more consistent with event handlers management. The setStepHandler method has therefore been replaced by addStephandler, the getStepHandler method has been replaced by getStepHandlers which returns a Collection and a clearStepHandlers method has been added. All ODE integrators now support setting a maximal number of evaluations of differential equations function. If this number is exceeded, an exception will be thrown during integration. This can be used to prevent infinite loops if for example error control or discrete events create a really large number of extremely small steps. All step interpolators for ODE integrators now provide interpolation for both the state and its time derivatives. The interpolated derivatives are the exact derivatives of the interpolated state, thus preserving consistency. The general step handlers hence do not need to call the derivation function anymore. The fixed step handlers also get the time derivative of the state as an additional argument along with the state when they are called. Changed return type for FirstOrderIntegrator.integrate() to double in order to retrieve exact stop time. This allows to handle properly integration interruption due to an EventHandler instance asking to stop the integration when its associated event is triggered. The state was already set to the current state at interruption time, but it was difficult to get the corresponding time (it involved setting a step handler monitoring the last step specially). Events handlers in the ODE package now also provide the switching function variation (increasing/decreasing) when an event occurs Clarified the ODE package by breaking in into several sub-packages and renaming classes (SwitchingFunctions/EventHandler, SwitchingFunctionsHandler/CombinedEventsManager) Changed return type for FirstOrderIntegrator.getSwitchingFunctions() to a collection of SwitchingFunction instances. This better suits the intended use of the method and fixes a visibility error since the previous return type referenced the package private SwitchState class. Fixed dimension error on output vector for the operate method in RealMatrixImpl and BigMatrixImpl classes. The FirstOrderDifferentialEquations, FirstOrderIntegrator and FixedStepHandler interfaces now extends Serializable, allowing integrators, problems and handlers to be embedded into users Serializable classes. Added several convenience methods and constants for Vector3D and Rotation. Replaced public no argument constructors with IDENTITY or ZERO static instances for immutable classes Vector3D and Rotation. Fixed inconsistencies in the naming scheme for static fields in Vector3D and Rotation with respect to the overall library. Greatly improved RealMatrixImpl and BigMatrixImpl performances, both in terms of speed and in terms of temporary memory footprint. Added Mauro's patch to support multiple regression. Starting with version 2.0 of the library, the minimal version of the Java platform required to compile and use Commons Math is Java 5. This version is widely deployed now on many systems. It brings new important features for specific mathematical developments, for example new functions (log10, cbrt, ulp, signum, cosh, sinh, tanh, hypot, expm1, log1p), autoboxing, MathContext or RoundingMode. It also brings important features for general development, for example enums, generics or annotations. Switching functions can now throw dedicated SwitchException from all their method. At upper call level, the various ODE integrators handle these new exceptions and wrap them into IntegratorException instances, hence the integrators methods signature did not change. Added the getSwitchingFunctions and clearSwitchingFunctions to the FirstOrderIntegrator interface and all its implementations Removed deprecated features. This includes the following changes. Factory-based instantiation replaced by setter injection in 1.2 in several classes have been removed. Protected fields in matrices implementations have been declared final and private. Identity factory methods moved to MatrixUtils class have been removed. Complex utilities methods that have been superseded by Complex instance methods have been removed. Fixed formula in fast cosine transformer javadoc comments. Javadoc and style fixes. Added an error detection for missing imaginary character while parsing complex string Detect numerical problems in Q.R decomposition for Levenberg-Marquardt estimator and report them appropriately Fixed several crashes in getCovariances() and guessParametersErrors() in AbstractEstimator when some parameters are bound. The methods now explicitly give result only about unbound parameters. Fixed truncation error in t-test classes for large t values. Added root checks for the endpoints. Fixed numerous warnings in test code. Use the initial guess provided by the user in BrentSolver.solve(), thus improving speed. Added the estimation, optimization, geometry and ode packages from the Mantissa library. Made ComplexFormat format double values with a provided NumberFormat instance instead of using the real part format for all values. Added Pascal distribution implementation. Added QR Decomposition. Modified ProperFractionFormat to reject embedded minus signs. Added a nextAfter method in MathUtils to return the next machine-representable number in a specified direction from a given floating point number. Used this to ensure that MathUtils.round does not return incorrect results for numbers with bad IEEE754 representations. Added Fast Fourier Transform implementation. Modified getSumSquaredErrors method in SimpleRegression to always return a non-negative result. Corrected nextInt and nextLong to handle wide value ranges. Increased default precision of Gamma and Beta functions. Added log function to MathUtils. Added two sample (binned comparison) ChiSquare test. Modified NormalDistributionImpl.cumulativeProbablity to catch MaxIterationsExceededException and return 0 or 1, resp. if the argument is more than 20 standard deviations from the mean. Added SynchronizedDescriptiveStatistics class. Added addAndCheck, mulAndCheck, and subAndCheck MathUtils methods for long integer arguments. Merged most functions from ComplexUtils into Complex class, added static factory method to Complex. Deprecated abstract factory methods and made DescriptiveStatistics and and SummaryStatistics concrete classes. Pushed implementations up from DescriptiveStatisticsImpl, SummaryStatisticsImpl. Made implementations of statistics configurable via setters. Changed Mean.evaluate() to use a two-pass algorithm, improving accuracy by exploiting the the fact that this method has access to the full array of data values. Added check and rescaling of expected counts to sum to sum of expected counts if necessary in ChiSquare test. Handle multiplication of Complex numbers with infinite parts specially. Add errors guessing to least-squares estimators. Add tests for Fraction constructor using double parameter. Added one-way ANOVA implementation. Add Fraction constructor using max denominator value. Add integer overflow checks in Fraction constructor using double parameter. Throw EOFException when using empty files with ValueServer in replay and digest modes. Added a equals and hash methods in MathUtils to check for double arrays Added an angle normalization method in MathUtils to force angles in some user-defined interval Added vectorial covariance computation (either sample or population covariance) Added multivariate summary statistics. Added getSumOfLogs method to SummaryStatistics and made SumOfLogs instance used by GeometricMean configurable. Fixed AbstractIntegerDistribution cumulativeProbablility(-,-) to correctly handle double arguments. Made numerator and denominator final in Fraction and deprecated protected real and imaginary parts fields in Complex, making Fraction immutable and preparing Complex to become fully immutable in 2.0. Made NewtonSolver derivative field transient and implemented readObject to initialize. Made sampleStats field private and changed getUpperBounds to return a fresh copy in EmpiricalDistributionImpl. Added polar2Complex method to ComplexUtils to create Complex numbers from polar representations. Made all serialVersionUIDs private. Improved documentation and test cases related to handling of infinite and NaN values in Complex, ComplexUtils classes. Fixed incorrect NaN handling in o.a.m.s.d.rank.Min, Max Changed RealMatrixImpl.equals to use Double.doubleToLongBits to compare corresponding matrix entries. Eliminated floating point equals comparison in Percentile.evaluate. Eliminated unnecessary assignment statements in Skewness.getResult method. Synchronized getters in ResizeableDoubleArray. Eliminated unnecessary assignment statement in BisectionSolver.solve method. Implemented hashCode in the Complex class and changed the semantics of equals to make all instances with real or imaginary part NaN equal. Fixed bin index overflow problem in EmpiricalDistributionImpl. Added protection against numerical overflow and underflow in the isBracketing method. Fixed division by zero error in rounding methods. Added upper tail cumulative probability method to HypergeometricDistributionImpl. Added better handling of numerical overflow and division by zero in Complex calculations. Changed ContinuedFraction to better handle infinite convergents that resulted in divergent continued fraction evaluations. Changed rounding methods to not rely on BigDecimal conversions which was causing numerical error. Changed Fraction(double) to correctly handle near-integral arguments. Changed lcm to throw ArithmeticException (instead of returning bogus value) if the result is too large to store as an integer. Added factories for TTest, ChiSquareTest and TestUtils class with static methods to create instances and execute tests. Eliminated repeated endpoint function evalutations in BrentSolver, SecantSolver. Added setSubMatrix methods to RealMatrixImpl, BigMatrixImpl. To Preserve backward compatibility with version 1.0, these methods were not added to the RealMatrix, BigMatrix interfaces. Added createXIdentityMatrix methods to MatrixUtils and deprecated getIdentity methods in RealMatrixImpl, BigMatrixImpl. Modified RealMatrixImpl, BigMatrixImpl constructors to throw IllegalArgumentExceptions instead of ArrayIndexOutOfBounds when dimension arguments are not positive. Made PRNG pluggable for classes in the random package. Added RandomGenerator interface extracted from java.util.random and abstract implementation, AbstractRandomGenerator providing default implementations of methods based on nextDouble(). Added a constructor taking a RandomGenerator as an argument to RandomDataImpl. Changed ValueServer to use a RandomData in its constructor. Changes to 1.0 classes should be backward compatible (including serialization). Added utility methods for overflow-checked integer arithmetic and improved gcd method in MathUtils. Fixed error in TTestImpl.homoscedasticTtest. Implementation was incorrectly using heteroscedastic t statistic. Also improved sensitivity of test cases. Fixed javadoc errors. One-sided t-test significance adjustment was reversed in javadoc for boolean-valued test methods. Fixed bug in PolynomialSplineFunction to allow evaluation of the function at the last knot point. Added Weibull distribution implementation. Added Cauchy distribution implementation. Added convenience methods for rounding. Added Fraction class based on commons-lang implementation. With the fraction class, FractionFormat and ProperFractionFormat classes were added to provide fraction formatting and parsing.