Custom neighborhood calculation