Prevent NaN to occur for singular matrices
Numerical inaccuracies in the underlying eigendecomposition could induce
very small negative eigenvalues, so the square root produced NaNs. The
eigenvalues really cannot be negative, so it is safe to replace the negative
ones by 0.
There are remaining problems with singular matrices:
- the singular vectors also contain NaNs
- the solver does not really work in least square sense and
complain about singular matrices
JIRA: MATH-320
fixed some NaN appearing in eigenvectors when null pivots occurred in dstqds or dqds algorithms
this is a partial fix for MATH-297 but not a complete one as for example computing the
eigendecomposition if identity leads to three times the same vector ...
JIRA: MATH-297
Fixed an overflow error in MathUtils.distance that was causing KMeansPlusPlusClusterer to fail with a NullPointerException when
component distances between points exceeded Integer.MAXVALUE.
JIRA: MATH-305
Reported by Erik van Ingen
Added generationsEvolved property to GeneticAlgorithm to track the number
of generations evolved by the evolve() method before reaching the StoppingCondition.
JIRA: MATH-315
Reported and patched by Mikkel Meyer Andersen
MATH-311. Changed probability calculations for Binomial, Poisson, and Hypergeometric distributions to use Catherine Loader's saddle point approximations
Fixed implementation of EmpiricalDistributionImpl#getUpperBounds to match interface
contract. Added getGeneratorUpperBounds method to EmpiricalDistributionImpl providing previous behavior.