class DoubleArrays {

  /** Returns a double[] initialized with the values from 0 to n-1, inclusive; */
  public static double[] toN(int n) {<FILL_FUNCTION_BODY>}

  public static double[][] to2dArray(NumericColumn<?>... columns) {
    Preconditions.checkArgument(columns.length >= 1);
    int obs = columns[0].size();
    double[][] allVals = new double[obs][columns.length];

    for (int r = 0; r < obs; r++) {
      for (int c = 0; c < columns.length; c++) {
        allVals[r][c] = columns[c].getDouble(r);
      }
    }
    return allVals;
  }

  public static double[][] to2dArray(List<NumericColumn<?>> columnList) {
    return to2dArray(columnList.toArray(new NumericColumn<?>[0]));
  }

  public static double[][] to2dArray(TableSliceGroup views, int columnNumber) {
    int viewCount = views.size();

    double[][] allVals = new double[viewCount][];
    for (int viewNumber = 0; viewNumber < viewCount; viewNumber++) {
      TableSlice view = views.get(viewNumber);
      allVals[viewNumber] = new double[view.rowCount()];
      NumericColumn<?> numberColumn = view.numberColumn(columnNumber);
      for (int r = 0; r < view.rowCount(); r++) {
        allVals[viewNumber][r] = numberColumn.getDouble(r);
      }
    }
    return allVals;
  }

  public static double[][] to2dArray(double[] x, double[] y) {
    double[][] allVals = new double[x.length][2];
    for (int i = 0; i < x.length; i++) {
      allVals[i][0] = x[i];
      allVals[i][1] = y[i];
    }
    return allVals;
  }

  public static double[][] to2dArray(NumericColumn<?> x, NumericColumn<?> y) {
    double[][] allVals = new double[x.size()][2];
    for (int i = 0; i < x.size(); i++) {
      allVals[i][0] = x.getDouble(i);
      allVals[i][1] = y.getDouble(i);
    }
    return allVals;
  }
}

    double[] result = new double[n];
    for (int i = 0; i < n; i++) {
      result[i] = i;
    }
    return result;
  
<no_super_class>