Degree preserving rewiring process for undirected networks.
dprewire_undirected_cpp(
iteration,
nattempts,
node1,
node2,
degree1,
degree2,
index1,
index2,
e,
rewire_history
)Returns node sequences, assortativity coefficient after each iteration, and rewiring history.
Integer, number of iterations for rewiring attempts.
Integer, number of rewiring attempts per iteration.
Vector, first column of edgelist.
Vector, second column of edgelist.
Vector, degree of node1 and node2.
Vector, degree of node2 and node1. degree1 and degree2 are used to calculate assortativity coefficient, i.e., degree correlation.
Index of the first column of edgelist.
index1 and index2 bridge the nodes' degree and the
structure e.
Index of the second column of edgelist.
Matrix, target structure (eta) generated by
wdnet::get_eta_undirected().
Logical, whether the rewiring history should be returned.