question: public static void writeSortedFirstDim ( float [ ] [ ] matrix , String fn ) throws IOException { BufferedWriter outBuf = new BufferedWriter ( new FileWriter ( fn ) ) ; ArrayList < Float > firsts = new ArrayList < > ( ) ; for ( int row = 0 ; row < matrix . length ; ++ row ) { firsts . add ( matrix [ row ] [ 0 ] ) ; } Collections . sort ( firsts ) ; for ( Float num : firsts ) { outBuf . write ( String . format ( "%f\n" , num ) ) ; } outBuf . close ( ) ; }
target:  Writes the first column of the matrix to a file. This is particular for an experiment on convergence.