class NumberInterpolator extends Interpolator<T> {

  public DoubleColumn linear() {
    DoubleColumn result = col.asDoubleColumn();
    int last = -1;
    for (int i = 0; i < col.size(); i++) {
      if (!col.isMissing(i)) {
        if (last >= 0 && last != i - 1) {
          for (int j = last + 1; j < i; j++) {
            result.set(
                j,
                col.getDouble(last)
                    + (col.getDouble(i) - col.getDouble(last)) * (j - last) / (i - last));
          }
        }
        last = i;
      }
    }
    return result;
  }

  public  NumberInterpolator(NumericColumn<T> col);

}