connected_neighbors {scanstatistics} | R Documentation |
Find the connected sets for a location and its k
nearest neighbors.
Description
Returns a set
of set
s, each set of the latter type containing
the location itself and zero or more of its neighbors, if they are connected.
Usage
connected_neighbors(neighbors, adjacency_matrix)
Arguments
neighbors |
A vector of neighbors to a location, the first element of the vector being the specific location, and the other elements its other nearest neighbors. Locations should be encoded as integers. |
adjacency_matrix |
A boolean matrix, with element |
Value
Returns a set
of set
s, each set of the latter type
containing the location itself and zero or more of its neighbors, if they
are connected.
[Package scanstatistics version 1.1.1 Index]