import java.util.*; import java.io.*; public class AnalyseSRI { private static void show(long[]x){ int n = x.length; for (int i=0;i 0) sat = sat + 1.0; skip(sc,24); } //System.out.print(n +" "+ edges +" "); System.out.format("%d %.3f ",n,p); System.out.print((sat/m) +" "); System.out.print(((double)sum(solutions)/(double)m) +" "+ min(solutions) +" "+ median(solutions) +" "+ max(solutions) +" "); System.out.println(); } public static void main(String[] args) throws IOException { Scanner sc = new Scanner(new File(args[0])); int n = Integer.parseInt(args[1]); // agents double pLo = Double.parseDouble(args[2]); double pHi = Double.parseDouble(args[3]); double pInc = Double.parseDouble(args[4]); int m = Integer.parseInt(args[5]); // sample size double p = pLo; // (1.0-p) from SM (p=0 <-> SM), p from SR (p=1 <-> SR) while (p < pHi+pInc){ stats(sc,n,p,m); p = p + pInc; } } }