bipartite_gnm | R Documentation |
Generate bipartite graphs using the Erdős-Rényi model
bipartite_gnm(...)
bipartite_gnp(...)
sample_bipartite_gnm(
n1,
n2,
m,
...,
directed = FALSE,
mode = c("out", "in", "all")
)
sample_bipartite_gnp(
n1,
n2,
p,
...,
directed = FALSE,
mode = c("out", "in", "all")
)
... |
Passed to |
n1 |
Integer scalar, the number of bottom vertices. |
n2 |
Integer scalar, the number of top vertices. |
m |
Integer scalar, the number of edges for |
directed |
Logical scalar, whether to create a directed graph. See also
the |
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. |
p |
Real scalar, connection probability for |
Similarly to unipartite (one-mode) networks, we can define the G(n,p)
, and
G(n,m)
graph classes for bipartite graphs, via their generating process.
In G(n,p)
every possible edge between top and bottom vertices is realized
with probability p
, independently of the rest of the edges. In G(n,m)
, we
uniformly choose m
edges to realize.
Random graph models (games)
erdos.renyi.game()
,
sample_()
,
sample_bipartite()
,
sample_chung_lu()
,
sample_correlated_gnp()
,
sample_correlated_gnp_pair()
,
sample_degseq()
,
sample_dot_product()
,
sample_fitness()
,
sample_fitness_pl()
,
sample_forestfire()
,
sample_gnm()
,
sample_gnp()
,
sample_grg()
,
sample_growing()
,
sample_hierarchical_sbm()
,
sample_islands()
,
sample_k_regular()
,
sample_last_cit()
,
sample_pa()
,
sample_pa_age()
,
sample_pref()
,
sample_sbm()
,
sample_smallworld()
,
sample_traits_callaway()
,
sample_tree()
## empty graph
sample_bipartite_gnp(10, 5, p = 0)
## full graph
sample_bipartite_gnp(10, 5, p = 1)
## random bipartite graph
sample_bipartite_gnp(10, 5, p = .1)
## directed bipartite graph, G(n,m)
sample_bipartite_gnm(10, 5, m = 20, directed = TRUE, mode = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.