connected_neighbors: Find the connected sets for a location and its k nearest...

Description Usage Arguments Value

Description

Returns a set of sets, each set of the latter type containing the location itself and zero or more of its neighbors, if they are connected.

Usage

1
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 (i,j) set to TRUE if location j is adjacent to location i.

Value

Returns a set of sets, each set of the latter type containing the location itself and zero or more of its neighbors, if they are connected.


BenjaK/scanstatistics documentation built on May 5, 2019, 2:41 p.m.