Returns TRUE if the neighboring locations are connected to the given location, FALSE if not.
is_connected(neighbor_locations, location, adjacency_matrix)
Boolean: is the neighbors connected to the given location?
A set
of neighboring locations to the given
location; these neighbors do not include the given location itself.
A location, preferably given as an integer.
A boolean matrix, with element \((i,j)\) set to TRUE if location \(j\) is adjacent to location \(i\).