code: private static Matrix readDenseSVDLIBCbinary(File matrix, Type matrixType,
                                                   boolean transposeOnRead) 
              throws IOException {
          DataInputStream dis = new DataInputStream(
              new BufferedInputStream(new FileInputStream(matrix)));
  
          int rows = dis.readInt();
          int cols = dis.readInt();
          Matrix m = (transposeOnRead)
              ? Matrices.create(cols, rows, matrixType)
              : Matrices.create(rows, cols, matrixType);
          
          if (transposeOnRead) {
              for (int row = 0; row < rows; ++row) {
                  for (int col = 0; col < cols; ++col) {
                      m.set(col, row, dis.readFloat());
                  }
              }
          }
          else {
              for (int row = 0; row < rows; ++row) {
                  for (int col = 0; col < cols; ++col) {
                      m.set(row, col, dis.readFloat());
                  }
              }
          }
          dis.close();
          return m;
      }
docs: Creates a {@code Matrix} from the data encoded as {@link
  Format#SVDLIBC_DENSE_BINARY} in provided file.
  
  @param matrix
  @param matrixType
  
  @return a matrix whose data was specified by the provided file