DoubleArrays { public static double[] toN(int n) { double[] result = new double[n]; for (int i = 0; i < n; i++) { result[i] = i; } return result; }  static double[] toN(int n); static double[][] to2dArray(NumericColumn<?>... columns); static double[][] to2dArray(List<NumericColumn<?>> columnList); static double[][] to2dArray(TableSliceGroup views, int columnNumber); static double[][] to2dArray(double[] x, double[] y); static double[][] to2dArray(NumericColumn<?> x, NumericColumn<?> y);  }
@Test public void testToN() { double[] array = {0, 1, 2}; assertTrue(Arrays.equals(array, DoubleArrays.toN(3))); }