powered by
Generate random signed graphs according to the G(n,p) Erdos-Renyi model
sample_gnp_signed(n, p, p_neg, directed = FALSE, loops = FALSE)
a signed igraph graph object
The number of vertices in the graph.
The probability for drawing an edge between two arbitrary vertices.
The probability of a drawn edge to be a negative tie
logical, whether the graph will be directed. defaults to FALSE.
logical, whether to add loop edges, defaults to FALSE.
Erdos, P. and Renyi, A., On random graphs, Publicationes Mathematicae 6, 290–297 (1959).
sample_gnp_signed(10, 0.4, 0.5)
Run the code above in your browser using DataLab