Swap an edge of a bipartite graph while maintaining the bipartite nature. This function is not perfectly named as it runs more than a single edge swap (whereas the R implemented functions only run a single swap).
swap_an_edgeC(n1, n2, N, max_try, quiet)
n1, n2 | the graph built as a set of two vectors with the nodes for each edge |
---|---|
N | the number of edges to swap (one at a time) |
max_try | number of times to try to find two edges to swap; no message is relayed for a single unsuccessful edge swap - instead a message at the end prints the number of successful edge swaps in total |
quiet | boolean for if you want a message if not |
n1
with nodes swapped