code: public int getIndexMax() {
          int indexMax = 0;
          double max = getEigenvalue(0).getMagnitude2();
  
          final int N = getNumberOfEigenvalues();
          for( int i = 1; i < N; i++ ) {
              double m = getEigenvalue(i).getMagnitude2();
              if( m > max ) {
                  max = m;
                  indexMax = i;
              }
          }
  
          return indexMax;
      }
docs: Returns the index of the eigenvalue which has the largest magnitude.
  
  @return index of the largest magnitude eigen value.