dprewire_directed {wdnet} | R Documentation |
Degree preserving rewiring for directed networks
Description
Degree preserving rewiring towards the target structure eta
.
Usage
dprewire_directed(
edgelist,
eta,
iteration = 200,
nattempts,
rewire.history = FALSE
)
Arguments
edgelist |
A two-column matrix, each row represents a directed edge from the first column to the second column. |
eta |
A matrix generated by |
iteration |
An integer, the number of rewiring iterations, with each
iteration consisting of |
nattempts |
An integer, the number of rewiring attempts for each
iteration. Default value equals the number of rows in |
rewire.history |
Logical, whether the rewiring history should be returned. |
Value
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).