dprewire_undirected | R Documentation |
Degree preserving rewiring towards the target structure eta
.
dprewire_undirected(
edgelist,
eta,
iteration = 200,
nattempts,
rewire.history = FALSE
)
edgelist |
A two column matrix, each row represents an undirected edge. |
eta |
A matrix generated by |
iteration |
An integer, number of rewiring iterations, each iteration
consists of |
nattempts |
An integer, number of rewiring attempts for each iteration.
The default value equals the number of rows in |
rewire.history |
Logical, whether the rewiring history should be returned. |
Rewired edgelist, assortativity coefficient after each iteration, and
rewiring history (including the index of sampled edges and rewiring
result). For each rewiring attempt, two rows are sampled from the
edgelist
, for example Edge1:{v_1, v_2} and Edge2:{v_3, v_4}, the
function try to rewire the sampled edges as {v_1, v_4}, {v_3, v_2}
(rewire type 1) or {v_1, v_3}, {v_2, v_4} (rewire type 2) with
probability 1/2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.