Basic Properties
Arguments
- graph
An
igraph_ptrobject.- from
An integer vector of vertex IDs.
- to
An integer vector of vertex IDs.
See also
edge(), neighbors(), incident() for similar operations.
as_adjlist() and degree() can apply to all vertices at once.
Examples
g = graph_tree(5L)
are_adjacent(g, 1L, 2L)
#> [1] TRUE
are_adjacent(g, 1L, 4L)
#> [1] FALSE