lu-preprocessing.stat
get-neighbours
(get-neighbours values)
Returns a list of neighbours for groupped cells. values: A hash-map of group ids with their positions (by row). returns: A hash-map with cell group identifiers and its neighbours. ## Usage (require '[lu-preprocessing.stat :refer :all]) (get-neighbours {0 {0 [0 1 2 4] 1 [4 5] 8 [5]} 1 {0 [5]} 2 {1 [0 1 2]} 3 {1 [3] 7 [0 1 2 3 4] 8 [0 1 2 3 4]} 4 {3 [1]} 5 {5 [0 1 2 3 4 5] 6 [0 1 2 3 4 5] 7 [5]} 6 {9 [0]}}) => {0 [1 2 3 5] 1 [0] 2 [0 3] 3 [0 2 5 6] 4 [] 5 [0 3] 6 [3]}