public double max ( double [ ] series ) { double max = Double . MIN_VALUE ; for ( int i = 0 ; i < series . length ; i ++ ) { if ( max < series [ i ] ) { max = series [ i ] ; } } return max ; }
Finds the maximal value in timeseries .