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)

Value

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

Arguments

graph

The graph.

See Also

Other simple queries: edges, order, vertices

Examples

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

Run the code above in your browser using DataLab