public void init() {
    this.agg = new Aggregation();
    window = new LinkedList<Double>();
    for (int i = current; i < Math.min(data.size(), current + front + 1); ++i) {
      // only include data read from the same file.
      if (data.get(i).getAttribute(feature_name) instanceof Number) {
        double d = ((Number) data.get(i).getAttribute(feature_name)).doubleValue();
        window.add(d);
        agg.insert(d);
      } else {
        if ((data.get(i).getAttribute(feature_name) instanceof Contour) &&
            (((Contour) data.get(i).getAttribute(feature_name)).size() > 0)) {

          for (Pair<Double, Double> tvp : (Contour) data.get(i).getAttribute(feature_name)) {
            Double d = tvp.second;

            window.add(d);
            agg.insert(d);
          }

        }
      }
    }
  }