Fast and flexible k-d trees for various types of point queries.