public static double [ ] rowMax ( double [ ] [ ] data ) { double [ ] x = new double [ data . length ] ; for ( int i = 0 ; i < x . length ; i ++ ) { x [ i ] = max ( data [ i ] ) ; } return x ; }
Returns the row maximum for a matrix .