示例#1
0
  public static void main(String[] args) {
    int N = Integer.parseInt(args[0]);
    int T = Integer.parseInt(args[1]);
    int[] edges = new int[T];

    for (int t = 0; t < T; t++) edges[t] = count(N);

    StdOut.println("1/2 N ln N = " + 0.5 * N * Math.log(N));
    StdOut.println("mean       = " + StdStats.mean(edges));
    StdOut.println("stddev     = " + StdStats.stddev(edges));
  }
示例#2
0
 public double stddev() {
   return StdStats.stddev(threshold);
 }
示例#3
0
 public double mean() {
   return StdStats.mean(threshold);
 }