Skip to content

Commit

Permalink
fix: adjacent_vertices() and incident_edges() are now correct if …
Browse files Browse the repository at this point in the history
…the `"return.vs.es"` option is `FALSE` (#1606)
  • Loading branch information
stibu81 authored Nov 30, 2024
1 parent f5dc296 commit 1d38d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/interface.R
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ adjacent_vertices <- function(graph, v,
on.exit(.Call(R_igraph_finalizer))

res <- .Call(R_igraph_adjacent_vertices, graph, vv, mode)
res <- lapply(res, `+`, 1)

if (igraph_opt("return.vs.es")) {
res <- lapply(res, `+`, 1)
res <- lapply(res, unsafe_create_vs, graph = graph, verts = V(graph))
}

Expand Down

0 comments on commit 1d38d60

Please sign in to comment.