If only one of the two columns in the edge list is needed, these functions provide a more efficient way to access them.
Arguments
- graph
An
igraph_ptr
object.
Value
igraph_from()
returns the head vertices of all the edges.
igraph_to()
returns the tail vertices of all the edges.
See also
as.matrix.igraph_ptr()
and as.data.frame.igraph_ptr()
to
get entire edge lists.
Examples
g = graph_create(seq_len(6L))
igraph_from(g)
#> [1] 1 3 5
igraph_to(g)
#> [1] 2 4 6