powered by
The order of the vertices only matters in directed graphs, where the existence of a directed (v1, v2) edge is queried.
(v1, v2)
are_adjacent(graph, v1, v2)
The graph.
The first vertex, tail in directed graphs.
The second vertex, head in directed graphs.
A logical scalar, TRUE is a (v1, v2) exists in the graph.
TRUE
Other structural queries: [.igraph(), [[.igraph(), adjacent_vertices(), ends(), get.edge.ids(), gorder(), gsize(), head_of(), incident_edges(), incident(), is_directed(), neighbors(), tail_of()
[.igraph()
[[.igraph()
adjacent_vertices()
ends()
get.edge.ids()
gorder()
gsize()
head_of()
incident_edges()
incident()
is_directed()
neighbors()
tail_of()
# NOT RUN { ug <- make_ring(10) ug are_adjacent(ug, 1, 2) are_adjacent(ug, 2, 1) dg <- make_ring(10, directed = TRUE) dg are_adjacent(ug, 1, 2) are_adjacent(ug, 2, 1) # }
Run the code above in your browser using DataLab