File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/org/cicirello/math/la Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2018 Vincent A. Cicirello, <https://www.cicirello.org/>.
2+ * Copyright 2018, 2021 Vincent A. Cicirello, <https://www.cicirello.org/>.
33 *
44 * This file is part of JavaPermutationTools (https://jpt.cicirello.org/).
55 *
2626 * This class uses Jacobi iteration to compute the eigenvalues and eigenvectors of a symmetric matrix, provided as a 2-D Java array.
2727 *
2828 * @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
29- * @version 1.18.7.1
30- * @since 1.3
29+ * @version 2.15.2021
3130 */
3231public class JacobiDiagonalization {
3332
@@ -150,7 +149,7 @@ private boolean oneIteration(double epsilon) {
150149 for (int j = 0 ; j < N ; j ++) {
151150 if (i ==j ) continue ;
152151 double absAij = Math .abs (a [i ][j ]);
153- if (absAij > 0 && absAij < EPSILON ) {
152+ if (absAij > 0 && absAij < epsilon ) {
154153 // zero out any small entries
155154 absAij = a [i ][j ] = 0.0 ;
156155 }
@@ -175,11 +174,13 @@ private boolean oneIteration(double epsilon) {
175174 }
176175 return true ;
177176 }
177+ /* This appears to be an impossibility, so I'm removing it.
178178 // If a_pq is small, simply set entry to 0 and don't rotate.
179179 if (a_pq < epsilon) {
180180 a[p][q] = 0;
181181 return false;
182182 }
183+ */
183184 // compute some values
184185 double f = -a_pq ;
185186 double g = 0.5 *(a [p ][p ]-a [q ][q ]);
You can’t perform that action at this time.
0 commit comments