question: private void determineGlobalExtremumType ( ) { final double f = function ( alphaExtremum ) ; double [ ] alpha_1 = new double [ alphaExtremum . length ] ; double [ ] alpha_2 = new double [ alphaExtremum . length ] ; for ( int i = 0 ; i < alphaExtremum . length ; i ++ ) { alpha_1 [ i ] = Math . random ( ) * Math . PI ; alpha_2 [ i ] = Math . random ( ) * Math . PI ; } double f1 = function ( alpha_1 ) ; double f2 = function ( alpha_2 ) ; if ( f1 < f && f2 < f ) { extremumType = ExtremumType . MAXIMUM ; } else if ( f1 > f && f2 > f ) { extremumType = ExtremumType . MINIMUM ; } else if ( Math . abs ( f1 - f ) < DELTA && Math . abs ( f2 - f ) < DELTA ) { extremumType = ExtremumType . CONSTANT ; } else { throw new IllegalStateException ( "Houston, we have a problem:" + "\n" + this + "\nextremum at " + FormatUtil . format ( alphaExtremum ) + "\nf  " + f + "\nf1 " + f1 + "\nf2 " + f2 ) ; } }
target:  Determines the type of the global extremum.