simplegraph (version 1.0.0)

adjacent_vertices: Adjacent vertices for all vertices in a graph

Description

A vertex is adjacent is it is either a successor, or a predecessor.

Usage

adjacent_vertices(graph)

Arguments

graph
The graph.

Value

  • A named list of character vectors, the adjacent vertices for each vertex.

See Also

Other simple queries: edges, order, vertices

Examples

G <- graph(list(A = c("B", "C"), B = "C", C = "A"))
adjacent_vertices(G)