Beispiel #1
0
  public void remove(int v) {
    float x = x(v);
    float y = y(v);
    Bucket bucket = leaf(x, y).bucket;

    // The default return value for bucket.dupes is set to bucket.singles.
    // See note in add() for the reasoning behind this confusing choice.
    //
    long xyKey = xyToKey(x, y);
    IntsArray vs = bucket.dupes.get(xyKey);
    vs.remove(v);
    if (vs != bucket.singles && vs.n == 0) bucket.dupes.remove(xyKey);
  }