rewireCpp {clustAnalytics} | R Documentation |
Randomizes a weighted graph while keeping the degree distribution constant.
Description
Converts the graph to a weighted edge list in NumericMatrix, which is compatible with Rcpp. The Rcpp function "randomize" is called, and then the resulting edge list is converted back into an igraph object.
Usage
rewireCpp(
g,
Q = 100,
weight_sel = "max_weight",
lower_bound = 0,
upper_bound = NULL
)
Arguments
g |
|
Q |
Numeric. Parameter that controls the number of iterations, which will be Q times the order of the graph. |
weight_sel |
can be either "const_var" or "max_weight". |
lower_bound , upper_bound |
Bounds to the edge weights. The randomization process will avoid steps that would make edge weights fall outside these bounds. Set to NULL for no bound. By default, 0 and NULL respectively. |
Value
The rewired graph.
[Package clustAnalytics version 0.5.5 Index]