query method

void query(
  1. double min,
  2. double max,
  3. ItemVisitor visitor
)

Search for intervals in the index which intersect the given closed interval and apply the visitor to them.

@param min the lower bound of the query interval @param max the upper bound of the query interval @param visitor the visitor to pass any matched items to

Implementation

void query(double min, double max, ItemVisitor visitor) {
  init();

  // if root is null tree must be empty
  if (root == null) return;

  root!.query(min, max, visitor);
}