Description Usage Arguments Value Examples
View source: R/bipartite_edge_swap.R
Swap an edge of a bipartite graph while maintaining the partition
1 | swap_an_edge(gr, n1, n2, max_try = 100)
|
gr |
tidygraph graph object |
n1, n2 |
vectors that indicate the grouping of the nodes (by index) |
max_try |
Number of times to try to find two edges to swap. If no edges are found, the program will crash with the message "Unable to swap edges" |
a tidygraph graph object with two edges swapped
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.