Bipartite random signed graphs
Usage
sample_bipartite_signed(
n1,
n2,
p,
p_neg,
directed = FALSE,
mode = c("out", "in", "all")
)
Arguments
- n1
Integer scalar, the number of bottom vertices.
- n2
Integer scalar, the number of top vertices.
- p
The probability for drawing an edge between two arbitrary vertices.
- p_neg
The probability of a drawn edge to be a negative tie
- directed
logical, whether the graph will be directed. defaults to FALSE.
- mode
Character scalar, specifies how to direct the edges in directed graphs. If it is ‘out’, then directed edges point from bottom vertices to top vertices. If it is ‘in’, edges point from top vertices to bottom vertices. ‘out’ and ‘in’ do not generate mutual edges. If this argument is ‘all’, then each edge direction is considered independently and mutual edges might be generated. This argument is ignored for undirected graphs.
Examples
sample_bipartite_signed(10, 10, 0.5, 0.5)
#> IGRAPH ee09843 U--B 20 56 -- Bipartite Gnp random graph
#> + attr: name (g/c), p (g/n), type (v/l), sign (e/n)
#> + edges from ee09843:
#> [1] 2--11 3--11 4--11 5--11 7--11 9--11 10--11 1--12 3--12 6--12
#> [11] 8--12 10--12 2--13 3--13 4--13 5--13 6--13 7--13 10--13 1--14
#> [21] 3--14 7--14 8--14 2--15 3--15 4--15 6--15 9--15 2--16 6--16
#> [31] 7--16 10--16 1--17 3--17 4--17 5--17 6--17 9--17 10--17 1--18
#> [41] 4--18 5--18 6--18 7--18 8--18 9--18 10--18 6--19 8--19 10--19
#> [51] 2--20 6--20 7--20 8--20 9--20 10--20