跳到内容

构造函数修饰符,用于删除多重边和环边

用法

simplified()

参见

构造函数修饰符(和相关函数)make_(), sample_(), with_edge_(), with_graph_(), with_vertex_(), without_attr(), without_loops(), without_multiples()

示例

sample_(pa(10, m = 3, algorithm = "bag"))
#> IGRAPH 7eade04 D--- 10 27 -- Barabasi graph
#> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm
#> | (g/c)
#> + edges from 7eade04:
#>  [1]  2->1  2->1  2->1  3->1  3->2  3->1  4->2  4->1  4->1  5->1  5->1  5->1
#> [13]  6->4  6->1  6->5  7->1  7->1  7->5  8->1  8->1  8->1  9->3  9->5  9->1
#> [25] 10->9 10->2 10->1
sample_(pa(10, m = 3, algorithm = "bag"), simplified())
#> IGRAPH 2534925 D--- 10 17 -- Barabasi graph
#> + attr: name (g/c), power (g/n), m (g/n), zero.appeal (g/n), algorithm
#> | (g/c)
#> + edges from 2534925:
#>  [1]  2->1  3->1  4->1  5->1  5->2  5->3  6->1  6->3  7->1  7->2  7->5  8->1
#> [13]  8->5  9->1  9->2 10->1 10->2