add_edge: Add Edges to an Adjacency List

View source: R/adjacency.R

add_edgeR Documentation

Add Edges to an Adjacency List

Description

Add Edges to an Adjacency List

Usage

add_edge(adj, v1, v2, zero = TRUE)

Arguments

adj

list of adjacent precincts

v1

integer or integer array for first vertex to connect. If array, connects each to corresponding entry in v2.

v2

integer or integer array for second vertex to connect. If array, connects each to corresponding entry in v1.

zero

boolean, TRUE if the list is zero indexed. False if one indexed.

Value

adjacency list.

Examples

data(towns)
adj <- adjacency(towns)
add_edge(adj, 2, 3)


geomander documentation built on April 16, 2023, 5:18 p.m.