Skip to contents

Determines the set of elements, distributed in clusters, that are contiguous to an element from another cluster.

Usage

interior_boundary(contiguity, partition, removeSymmetry = TRUE)

Arguments

contiguity

A contiguity matrix or a contiguity graph (package igraph). Prefer matrix is possible. (contiguity matrix or igraph graph)

partition

The partition. (vector of strictly positive integers)

removeSymmetry

TRUE (default) if symmetry should be removed from the result. (flag)

Value

a matrix with 4 columns (x1, x2, cluster1, cluster2) with as many rows as possible connections between an element of a cluster and another. If removeSymmetry = TRUE, only rows where x1 < x2 are kept.

Details

The interior boundary of a partition, under a certain contiguity, is defined as the set of elements contiguous to at least one other element from a different cluster than its own.