Exact fixed-radius nearest neighbor search with an application to clustering