get.adjlist {igraph} | R Documentation |
Create adjacency lists from a graph, either for adjacent edges or for neighboring vertices
get.adjlist(graph, mode = c("all", "out", "in", "total")) get.adjedgelist(graph, mode = c("all", "out", "in", "total"))
graph |
The input graph. |
mode |
Character scalar, it gives what kind of adjacent
edges/vertices to include in the lists. ‘out ’ is for
outgoing edges/vertices, ‘in ’ is for incoming
edges/vertices, ‘all ’ is for both. This argument is
ignored for undirected graphs. |
get.adjlist
returns a list of numeric vectors, which include
the ids of neighbor vertices (according to the mode
argument) of all
vertices.
get.adjedgelist
returns a list of numeric vectors, which
include the ids of adjacent edgs (according to the mode
argument) of all vertices.
A list of numeric vectors.
Gabor Csardi csardi@rmki.kfki.hu
g <- graph.ring(10) get.adjlist(g) get.adjedgelist(g)