isWithinDistanceWithTree method
Tests whether some two items from this tree and another tree lie within a given distance. {@link ItemDistance} is used as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search.
@param tree another tree @param itemDist a distance metric applicable to the items in the trees @param maxDistance the distance limit for the search @return true if there are items within the distance
Implementation
bool isWithinDistanceWithTree(
STRtree tree, ItemDistance itemDist, double maxDistance) {
BoundablePair bp =
new BoundablePair(this.getRoot(), tree.getRoot(), itemDist);
return isWithinDistance(bp, maxDistance);
}