code: private static Matrix readSVDLIBCsingularVector(File sigmaMatrixFile)
              throws IOException {
          BufferedReader br = 
              new BufferedReader(new FileReader(sigmaMatrixFile)); 
  
          int dimension = -1;
          int valsSeen = 0;
          Matrix m = null;
          for (String line = null; (line = br.readLine()) != null; ) {
              String[] vals = line.split("\\s+");
              for (int i = 0; i < vals.length; ++i) {
                  // the first value seen should be the number of singular values
                  if (dimension == -1) {
                      dimension = Integer.parseInt(vals[i]);
                      m = new DiagonalMatrix(dimension);
                  }
                  else {
                      m.set(valsSeen, valsSeen, Double.parseDouble(vals[i]));
                      ++valsSeen;
                  }
              }
          }
          return m;
      }
docs: Generates a diagonal {@link Matrix} from the special-case file format
  that SVDLIBC uses to output the &Sigma; matrix.