| are_adjacent | R Documentation |
The order of the vertices only matters in directed graphs,
where the existence of a directed (v1, v2) edge is queried.
are_adjacent(graph, v1, v2)
graph |
The graph. |
v1 |
The first vertex, tail in directed graphs. |
v2 |
The second vertex, head in directed graphs. |
A logical scalar, TRUE if edge (v1, v2) exists in the graph.
Other structural queries:
[.igraph(),
[[.igraph(),
adjacent_vertices(),
ends(),
get_edge_ids(),
gorder(),
gsize(),
head_of(),
incident(),
incident_edges(),
is_directed(),
neighbors(),
tail_of()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.