R igraph 手册页

如果您从 R 中使用 igraph,请使用此选项

adjacent_vertices {igraph}R 文档

图中多个顶点的相邻顶点

描述

此函数类似于 neighbors,但它一次查询多个顶点的相邻顶点。

用法

adjacent_vertices(graph, v, mode = c("out", "in", "all", "total"))

参数

输入图。

v

要查询的顶点。

模式

是否查询传出(‘out’)、传入(‘in’)边或两种类型(‘all’)。这对于无向图将被忽略。

顶点序列列表。

参见

其他结构查询:[.igraph(), [[.igraph(), are_adjacent(), ends(), get.edge.ids(), gorder(), gsize(), head_of(), incident_edges(), incident(), is_directed(), neighbors(), tail_of()

示例

g <- make_graph("Zachary")
adjacent_vertices(g, c(1, 34))

[包 igraph 版本 1.3.5 索引]