Degree preserving rewiring towards the target structure eta.
dprewire_directed(
edgelist,
eta,
iteration = 200,
nattempts,
rewire.history = FALSE
)Rewired edgelist, degree based assortativity coefficients after each iteration, rewiring history (including the index of sampled edges and rewiring result). For each rewiring attempt, two rows are sampled form the edgelist, for example Edge1:(v_1, v_2) and Edge2:(v_3, v_4). If the rewiring attempt is accepted, the sampled edges are replaced as (v_1, v_4), (v_3, v_2).
A two-column matrix, each row represents a directed edge from the first column to the second column.
A matrix generated by wdnet::get_eta_directed().
An integer, the number of rewiring iterations, with each
iteration consisting of nattempts rewiring attempts.
An integer, the number of rewiring attempts for each
iteration. Default value equals the number of rows in edgelist.
Logical, whether the rewiring history should be returned.