dprewire_undirected_cpp: Degree preserving rewiring process for undirected networks.

View source: R/RcppExports.R

dprewire_undirected_cppR Documentation

Degree preserving rewiring process for undirected networks.

Description

Degree preserving rewiring process for undirected networks.

Usage

dprewire_undirected_cpp(
  iteration,
  nattempts,
  node1,
  node2,
  degree1,
  degree2,
  index1,
  index2,
  e,
  rewire_history
)

Arguments

iteration

Integer, number of iterations for rewiring attempts.

nattempts

Integer, number of rewiring attempts per iteration.

node1

Vector, first column of edgelist.

node2

Vector, second column of edgelist.

degree1

Vector, degree of node1 and node2.

degree2

Vector, degree of node2 and node1. degree1 and degree2 are used to calculate assortativity coefficient, i.e., degree correlation.

index1

Index of the first column of edgelist. index1 and index2 bridge the nodes' degree and the structure e.

index2

Index of the second column of edgelist.

e

Matrix, target structure (eta) generated by wdnet::get_eta_undirected().

rewire_history

Logical, whether the rewiring history should be returned.

Value

Returns node sequences, assortativity coefficient after each iteration, and rewiring history.


wdnet documentation built on May 29, 2024, 9:32 a.m.