Implement join() for DistanceDataTree and its static classes