static double[] repDouble(int n, double d) { double[] a = new[n]; for i to n: a[i] = d; ret a; }