Generate bipartite graphs using the Erdos-Renyi model
integer, number of vertices of the first type
integer, number of vertices of the first type
Character scalar, the type of the graph, ‘gnp’ creates a $G(n,p)$ graph, ‘gnm’ creates a $G(n,m)$ graph. See details below.
probability for $G(n,p)$ graphs. Should not be given for $G(n,m)$ graphs.
integer, the number of edges for $G(n,p)$ graphs. Should not be given for $G(n,p)$ graphs.
logical, whether to create a directed graph
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.
character, the type of graph to be generated: igraph
or
network
a graph of class network
or igraph
Generate a random bipartite network, either as a igraph
or
network
object.
When using strategy 'gnp', a bipartite network is generated where each edge has probability 'p' of occuring. This means that consecutive runs of the algorithm will usually result in graphs with different numbers of edges.
When using strategy 'gnm', a bipartite network is generated with exactly 'm' edges. This means that consecutive runs of the algorithm will result in graphs with the same number of edges (but will occur between different vertices).
The generation is done through the sample_bipartite
function.