Added the ability to define (kind of a) maximum radius for neighbor search in combination with the weights