code: private static Matrix readSparseSVDLIBCtext(
               File matrix,
               Type matrixType,
               boolean transposeOnRead) throws IOException {
           BufferedReader br = new BufferedReader(new FileReader(matrix));
           String line = br.readLine();
           if (line == null)
               throw new IOException("Empty input Matrix");
   
               String[] numRowsColsNonZeros = line.split("\\s");
               int rows = Integer.parseInt(numRowsColsNonZeros[0]);
               int cols = Integer.parseInt(numRowsColsNonZeros[1]);
   
           Matrix m = (transposeOnRead)
               ? Matrices.create(cols, rows, matrixType)
               : Matrices.create(rows, cols, matrixType);
           
           for (int j = 0; j < cols && (line = br.readLine()) != null; ++j) {
               int numNonZeros = Integer.parseInt(line);
               for (int i = 0; i < numNonZeros && 
                       (line = br.readLine()) != null; ++i) {
                   String[] rowValue = line.split("\\s");
                   int row = Integer.parseInt(rowValue[0]);
                   double value = Double.parseDouble(rowValue[1]);
                   if (value != 0d) {
                       if (transposeOnRead)
                           m.set(j, row, value);
                       else
                           m.set(row, j, value);
                   }
               }
           }
           br.close();
           return m;
       }
docs: Creates a {@code Matrix} from the data encoded as {@link
  Format#SVDLIBC_SPARSE_TEXT} in provided file.
  
  @param matrix
  @param matrixType
  @param transposeOnRead
  
  @return a matrix whose data was specified by the provided file