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