docs: public void generateLatex(String path) {
          String output = "";
          output += "\\documentclass{article}\n";
          output += "\\usepackage{multirow}\n\\usepackage{booktabs}\n\\begin{document}\n\\begin{table}[htbp]\n\\caption{Add caption}";
          output += "\\begin{tabular}";
          output += "{";
          for (int i = 0; i < this.streams.size() + 4; i++) {
              output += "r";
          }
          output += "}\n\\toprule\nAlgorithm & \\multicolumn{2}{r}{Measure}";
          for (int i = 0; i < this.streams.size(); i++) {
              output += "& " + this.streams.get(i).getName();
          }
          output += "& AVG\\\\\n\\midrule\n";
          int algorithmSize = this.streams.get(0).algorithm.size();
          String name = "";
          for (int i = 0; i < algorithmSize; i++) {
              List<Algorithm> alg = this.streams.get(0).algorithm;
              output += "\\multirow{" + alg.get(i).measureStdSize + "}[" + 6 + "]{*}{" + alg.get(i).name + "}";
              List<Measure> measures[] = alg.get(i).getMeasuresPerData(streams);
              int cont = 0;
              double sum = 0.0;
              boolean isType = true;
              while (cont != this.streams.get(0).algorithm.get(i).measures.size()) {
                  sum = 0;
                  name = measures[0].get(cont).getName();
                  if (measures[0].get(cont).isType()) {
                      output += "&\\multirow{" + 2 + "}[4]{*}{" + name + "} & mean";
  
                  } else {
                      output += " & " + name;
                      output += "& Last value";
                  }
                  for (int j = 0; j < measures.length; j++) {
                      //sum =0;
                      if (measures[j].get(cont).isType()) {
                          output += " & " + Algorithm.format(measures[j].get(cont).getValue());
  
                          sum += measures[j].get(cont).getValue();
                          isType = true;
                      } else {
                          output += " & " + Algorithm.format1(measures[j].get(cont).getValue());
                          isType = false;
                      }
  
                  }
                  if (isType) {
                      double size = (double) this.streams.size();
                      output += "& " + Algorithm.format(sum / size);
                      output += "\\\\\n";
                      output += " & & std";
                      for (int j = 0; j < measures.length; j++) {
                          output += " & " + Algorithm.format(measures[j].get(cont).getStd());
                      }
                      output += " & -";
                  } else {
                      output += " & -";
  
                  }
                  output += "\\\\\n";
                  cont++;
              }
          }
          output += "\\bottomrule\n\\end{tabular}%\n\\label{tab:addlabel}%\n\\end{table}%\n\\end{document}";
  //        PrintStream out = null;
  //        try {
  //            out = new PrintStream(new BufferedOutputStream(new FileOutputStream(path + "summary.tex")));
  //        } catch (FileNotFoundException ex) {
  //            Logger.getLogger(Summary.class.getName()).log(Level.SEVERE, null, ex);
  //        }
  //        System.setOut(out);
  //        System.out.println(output);
  //        out.close();
          try {
              BufferedWriter out = new BufferedWriter(new FileWriter(path + "summary.tex"));
              out.write(output);  //Replace with the string 
              //you are trying to write  
              out.close();
          } catch (IOException e) {
              System.out.println(" Error saving summary.tex");
  
          }
      }