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 ; }
Returns the index of the eigenvalue which has the largest magnitude .