跳到内容

顶点序列的并集

用法

# S3 method for class 'igraph.vs'
union(...)

参数

...

要进行并集操作的顶点序列。

包含给定序列中所有顶点的顶点序列,每个顶点仅出现一次。

详细信息

它们必须属于同一个图。请注意,此函数具有“集合”语义,并且顶点在结果中会失去多重性。(这是为了匹配基于 unique 函数的行为。)

示例

g <- make_(ring(10), with_vertex_(name = LETTERS[1:10]))
union(V(g)[1:6], V(g)[5:10])
#> + 10/10 vertices, named, from adba9c0:
#>  [1] A B C D E F G H I J