Esempio n. 1
0
 /** Print a table of metrics for the given data. */
 private static void printData(Data data) {
   System.out.println("n\tK\tT\tSpdup\tEffic\tEDSF");
   System.out.println(
       data.n
           + "\t"
           + FMT_0.format(data.K_series.x(0))
           + "\t"
           + FMT_0.format(data.T_series.x(0))
           + "\t"
           + FMT_3.format(data.Speedup_series.x(0))
           + "\t"
           + FMT_3.format(data.Eff_series.x(0)));
   for (int i = 1; i < data.K_series.length(); ++i) {
     System.out.println(
         data.n
             + "\t"
             + FMT_0.format(data.K_series.x(i))
             + "\t"
             + FMT_0.format(data.T_series.x(i))
             + "\t"
             + FMT_3.format(data.Speedup_series.x(i))
             + "\t"
             + FMT_3.format(data.Eff_series.x(i))
             + "\t"
             + FMT_3.format(data.EDSF_series_2.x(i - 1)));
   }
 }
Esempio n. 2
0
 /** Plot the given data. */
 private static void plotData(Data data, String label) {
   int len = data.K_series.length();
   T_plot.xySeries(new AggregateXYSeries(data.K_series, data.T_series))
       .label(label, data.K_series.x(len - 1), data.T_series.x(len - 1));
   Speedup_plot.xySeries(new AggregateXYSeries(data.K_series, data.Speedup_series))
       .label(label, data.K_series.x(len - 1), data.Speedup_series.x(len - 1));
   Eff_plot.xySeries(new AggregateXYSeries(data.K_series, data.Eff_series))
       .label(label, data.K_series.x(len - 1), data.Eff_series.x(len - 1));
   EDSF_plot.xySeries(new AggregateXYSeries(data.K_series_2, data.EDSF_series_2))
       .label(label, data.K_series_2.x(len - 2), data.EDSF_series_2.x(len - 2));
 }