code: private boolean checkConverged(DMatrixRMaj A) {
          double worst = 0;
          double worst2 = 0;
          for( int j = 0; j < A.numRows; j++ ) {
              double val = Math.abs(q2.data[j] - q0.data[j]);
              if( val > worst ) worst = val;
              val = Math.abs(q2.data[j] + q0.data[j]);
              if( val > worst2 ) worst2 = val;
          }
  
          // swap vectors
          DMatrixRMaj temp = q0;
          q0 = q2;
          q2 = temp;
  
          if( worst < tol )
              return true;
          else if( worst2 < tol )
              return true;
          else
              return false;
      }
docs: Test for convergence by seeing if the element with the largest change
  is smaller than the tolerance.  In some test cases it alternated between
  the + and - values of the eigen vector.  When this happens it seems to have "converged"
  to a non-dominant eigen vector.    At least in the case I looked at.  I haven't devoted
  a lot of time into this issue...