if_connected: Return a set of the location and its neighbors if they are...

Description Usage Arguments Value

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

1
if_connected(distinct_neighbors, location, adjacency_matrix)

Arguments

distinct_neighbors

A set containing the neighboring locations to the given location, not including the location itself.

location

A location, preferably given as an integer.

adjacency_matrix

A boolean matrix, with element (i,j) set to TRUE if location j is adjacent to location i.

Value

A set of the given location and the neighbors if they are connected, else returns the empty set.


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