if_connected {scanstatistics} | R Documentation |
Return a set of the location and its neighbors if they are connected, else return the empty set.
Description
If the location and its neighbors, not including itself, are connected, then return the set containing the location and its neighbors; otherwise, return the empty set
Usage
if_connected(distinct_neighbors, location, adjacency_matrix)
Arguments
distinct_neighbors |
A |
location |
A location, preferably given as an integer. |
adjacency_matrix |
A boolean matrix, with element |
Value
A set
of the given location and the neighbors if they are
connected, else returns the empty set.
[Package scanstatistics version 1.1.1 Index]