Constant can be "static" (FindBugs)

This commit is contained in:
Gilles 2015-08-29 00:26:43 +02:00
parent 10dc13c807
commit 7b9df59a96
1 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public class EigenDecomposition {
/** Internally used epsilon criteria. */ /** Internally used epsilon criteria. */
private static final double EPSILON = 1e-12; private static final double EPSILON = 1e-12;
/** Maximum number of iterations accepted in the implicit QL transformation */ /** Maximum number of iterations accepted in the implicit QL transformation */
private final byte maxIter = 30; private static final byte MAX_ITER = 30;
/** Main diagonal of the tridiagonal matrix. */ /** Main diagonal of the tridiagonal matrix. */
private double[] main; private double[] main;
/** Secondary diagonal of the tridiagonal matrix. */ /** Secondary diagonal of the tridiagonal matrix. */
@ -608,9 +608,9 @@ public class EigenDecomposition {
} }
} }
if (m != j) { if (m != j) {
if (its == maxIter) { if (its == MAX_ITER) {
throw new MaxCountExceededException(LocalizedFormats.CONVERGENCE_FAILED, throw new MaxCountExceededException(LocalizedFormats.CONVERGENCE_FAILED,
maxIter); MAX_ITER);
} }
its++; its++;
double q = (realEigenvalues[j + 1] - realEigenvalues[j]) / (2 * e[j]); double q = (realEigenvalues[j + 1] - realEigenvalues[j]) / (2 * e[j]);