distance_to_diagonal: Generate matrix of distances from its own diagonal

Description Usage Arguments Details Value

View source: R/distance_to_diagonal.R

Description

Generate matrix of distances from its own diagonal

Usage

1

Arguments

n

Number of vertices

Details

Distances are determined assuming that the list of vertices loops back to the start. If there are 4 vertices, the output will be: 0 1 2 1 1 0 1 2 2 1 0 1 1 2 1 0 The value at row 1 col 4 is 1 because vertex 4 is considered to be adjacent to vertex 1.

Value

Matrix


crcox/latticize documentation built on Dec. 19, 2021, 6:19 p.m.