新图将包含与原始图相同的顶点、边和属性,只是通过 eids
参数中边的 ID 选择的边的方向将被反转。 当反转所有边时,此操作也称为图转置。
参见
用于操作图结构的其他函数:+.igraph()
, add_edges()
, add_vertices()
, complementer()
, compose()
, connect()
, contract()
, delete_edges()
, delete_vertices()
, difference()
, difference.igraph()
, disjoint_union()
, edge()
, igraph-minus
, intersection()
, intersection.igraph()
, path()
, permute()
, rep.igraph()
, simplify()
, union()
, union.igraph()
, vertex()
示例
g <- make_graph(~ 1 -+ 2, 2 -+ 3, 3 -+ 4)
reverse_edges(g, 2)
#> IGRAPH 22f8242 DN-- 4 3 --
#> + attr: name (v/c)
#> + edges from 22f8242 (vertex names):
#> [1] 1->2 3->2 3->4