expand method

void expand(
  1. Boundable bndComposite,
  2. Boundable bndOther,
  3. bool isFlipped,
  4. PriorityQueue priQ,
  5. double minDistance,
)

Implementation

void expand(Boundable bndComposite, Boundable bndOther, bool isFlipped,
    PriorityQueue priQ, double minDistance) {
  List children = (bndComposite as AbstractNode).getChildBoundables();
  for (Iterator i = children.iterator; i.moveNext();) {
    Boundable child = i.current as Boundable;
    BoundablePair bp;
    if (isFlipped) {
      bp = new BoundablePair(bndOther, child, itemDistance);
    } else {
      bp = new BoundablePair(child, bndOther, itemDistance);
    }
    // only add to queue if this pair might contain the closest points
    // MD - it's actually faster to construct the object rather than called distance(child, bndOther)!
    if (bp.getDistance() < minDistance) {
      priQ.add(bp);
    }
  }
}