
Separates the dense and sparse part from a (U,W) graphon mixture
separate_dense_and_sparse.RdThis function breaks a (U,W) mixture graph into a dense and sparse component.
Value
a list with the following components:
gr_denseThe dense component.
gr_sparseThe sparse component.
dataThe original graph.
Examples
library(igraph)
W <- matrix(0.1, nrow = 100, ncol = 100)
wts <- c(0.5, 0.3, 0.2)
ns <- 200
nd <- 100
p <- 0.5
gr <- sample_mixed_graph(W, wts, nd, ns, p = 0.1, option = 2)
out <- separate_dense_and_sparse(gr)
out
#> $dense_part
#> IGRAPH 7361eb0 U--- 132 502 -- Star
#> + attr: name_1 (g/c), name_2 (g/c), mode_1 (g/c), mode_2 (g/c),
#> | center_1 (g/n), center_2 (g/n), name (g/c), mode (g/c), center (g/n)
#> + edges from 7361eb0:
#> [1] 1-- 2 1-- 4 1-- 17 1-- 25 1-- 28 1-- 35 1-- 36 1-- 38 1-- 49 1-- 68
#> [11] 1-- 73 1-- 75 1-- 91 2-- 4 2-- 53 2-- 66 2-- 73 2-- 74 2-- 87 2-- 91
#> [21] 2-- 98 3-- 22 3-- 83 3-- 86 4-- 10 4-- 13 4-- 19 4-- 28 4-- 34 4-- 37
#> [31] 4-- 62 4-- 68 4-- 69 4-- 71 4-- 76 4-- 77 4-- 83 4-- 89 5-- 14 5-- 29
#> [41] 5-- 45 5-- 48 5-- 49 5-- 53 5-- 60 5-- 70 5-- 72 5-- 73 5-- 79 5-- 90
#> [51] 6-- 29 6-- 42 6-- 49 6-- 51 6-- 71 6-- 72 6-- 77 6--110 7-- 20 7-- 39
#> [61] 7-- 56 7-- 59 7-- 80 7-- 93 8-- 12 8-- 14 8-- 44 8-- 56 8-- 68 8-- 69
#> + ... omitted several edges
#>
#> $sparse_part
#> IGRAPH e8531d5 U--- 197 194 -- Star
#> + attr: name_1 (g/c), name_2 (g/c), mode_1 (g/c), mode_2 (g/c),
#> | center_1 (g/n), center_2 (g/n), name (g/c), mode (g/c), center (g/n)
#> + edges from e8531d5:
#> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--10 1--11 1--12 1--13
#> [13] 1--14 1--15 1--16 1--17 1--18 1--19 1--20 1--21 1--22 1--23 1--24 1--25
#> [25] 1--26 1--27 1--28 1--29 1--30 1--31 1--32 1--33 1--34 1--35 1--36 1--37
#> [37] 1--38 1--39 1--40 1--41 1--42 1--43 1--44 1--45 1--46 1--47 1--48 1--49
#> [49] 1--50 1--51 1--52 1--53 1--54 1--55 1--56 1--57 1--58 1--59 1--60 1--61
#> [61] 1--62 1--63 1--64 1--65 1--66 1--67 1--68 1--69 1--70 1--71 1--72 1--73
#> [73] 1--74 1--75 1--76 1--77 1--78 1--79 1--80 1--81 1--82 1--83 1--84 1--85
#> + ... omitted several edges
#>
#> $data
#> IGRAPH b4440c2 U--- 300 710 -- Star
#> + attr: name_1 (g/c), name_2 (g/c), mode_1 (g/c), mode_2 (g/c),
#> | center_1 (g/n), center_2 (g/n), name (g/c), mode (g/c), center (g/n)
#> + edges from b4440c2:
#> [1] 1-- 2 1-- 4 1-- 17 1-- 25 1-- 28 1-- 35 1-- 36 1-- 38 1-- 49 1-- 68
#> [11] 1-- 73 1-- 75 1-- 91 2-- 4 2-- 53 2-- 66 2-- 73 2-- 74 2-- 87 2-- 91
#> [21] 2-- 98 3-- 22 3-- 83 3-- 86 4-- 10 4-- 13 4-- 19 4-- 28 4-- 34 4-- 37
#> [31] 4-- 62 4-- 68 4-- 69 4-- 71 4-- 76 4-- 77 4-- 83 4-- 89 5-- 14 5-- 29
#> [41] 5-- 45 5-- 48 5-- 49 5-- 53 5-- 60 5-- 70 5-- 72 5-- 73 5-- 79 5-- 90
#> [51] 6-- 29 6-- 42 6-- 49 6-- 51 6-- 71 6-- 72 6-- 77 6--179 7-- 20 7-- 39
#> [61] 7-- 56 7-- 59 7-- 80 7-- 93 8-- 12 8-- 14 8-- 44 8-- 56 8-- 68 8-- 69
#> + ... omitted several edges
#>
#> $call
#> separate_dense_and_sparse(grmix = gr)
#>
#> attr(,"class")
#> [1] "separate_dense_and_sparse"