checkConstraints {wpm} | R Documentation |
Finds the neighbors of the current element (row, col) in the matrix m, depending on the chosen constraint pattern. Currently, there are only 3 valid patterns (NS, WE and NEWS)
checkConstraints(m, row, col, mode)
m |
matrix |
row |
current selected row in the matrix m |
col |
current selected column in the matrix m |
mode |
spatial constraint |
A vector containing the neighbors of element (row,col) of the matrix m.