diff --git a/projects/Math/81/org/apache/commons/math/linear/EigenDecompositionImpl.java b/projects/Math/81/org/apache/commons/math/linear/EigenDecompositionImpl.java index 2d0d72f..3fc328d 100644 --- a/projects/Math/81/org/apache/commons/math/linear/EigenDecompositionImpl.java +++ b/projects/Math/81/org/apache/commons/math/linear/EigenDecompositionImpl.java @@ -600,6 +600,7 @@ private void computeGershgorinCircles() { lowerSpectra = Math.min(lowerSpectra, lower); final double upper = dCurrent + eCurrent; work[upperStart + m - 1] = upper; + upperSpectra = Math.max(upperSpectra, upper); minPivot = MathUtils.SAFE_MIN * Math.max(1.0, eMax * eMax); } @@ -902,8 +903,8 @@ private void processGeneralBlock(final int n) diagMax = work[4 * i0]; offDiagMin = work[4 * i0 + 2]; double previousEMin = work[4 * i0 + 3]; - for (int i = 4 * i0; i < 4 * n0 - 11; i += 4) { - if ((work[i + 3] <= TOLERANCE_2 * work[i]) && + for (int i = 4 * i0; i < 4 * n0 - 16; i += 4) { + if ((work[i + 3] <= TOLERANCE_2 * work[i]) || (work[i + 2] <= TOLERANCE_2 * sigma)) { // insert a split work[i + 2] = -sigma; @@ -1540,7 +1541,7 @@ private void computeShiftIncrement(final int start, final int end, final int def double a2 = (work[np - 8] / b2) * (1 + work[np - 4] / b1); // approximate contribution to norm squared from i < nn-2. - if (end - start > 2) { + if (end - start > 3) { b2 = work[nn - 13] / work[nn - 15]; a2 = a2 + b2; for (int i4 = nn - 17; i4 >= 4 * start + 2 + pingPong; i4 -= 4) {