bktrees (hackage): Burkhard-Keller trees provide an implementation of sets which apart from the ordinary operations also has an approximate member search, allowing you to search for elements that are of a certain distance from the element you are searching for.
Keywords: bsd3|data-structures|library