Skip to contents

Incident vertices of some graph edges

Usage

ends(graph, es, ..., names = TRUE)

Arguments

graph

The input graph

es

The sequence of edges to query

...

These dots are for future extensions and must be empty.

names

Whether to return vertex names or numeric vertex IDs. By default vertex names are used.

Value

A two column matrix of vertex names or vertex IDs.

edges(), get_eids(), vcount(), ecount()

Examples

g <- make_ring(5)
ends(g, E(g))
#>      [,1] [,2]
#> [1,]    1    2
#> [2,]    2    3
#> [3,]    3    4
#> [4,]    4    5
#> [5,]    1    5