Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

Random Graph Generator Functions#

rustworkx.directed_gnp_random_graph(...[, seed])

Return a \(G_{np}\) directed random graph, also known as an Erdős-Rényi graph or a binomial graph.

rustworkx.undirected_gnp_random_graph(...[, ...])

Return a \(G_{np}\) random undirected graph, also known as an Erdős-Rényi graph or a binomial graph.

rustworkx.directed_gnm_random_graph(...[, seed])

Return a \(G_{nm}\) directed graph, also known as an Erdős-Rényi graph.

rustworkx.undirected_gnm_random_graph(...[, ...])

Return a \(G_{nm}\) undirected graph, also known as an Erdős-Rényi graph.

rustworkx.directed_sbm_random_graph(sizes, ...)

Return a directed graph from the stochastic block model.

rustworkx.undirected_sbm_random_graph(sizes, ...)

Return an undirected graph from the stochastic block model.

rustworkx.random_geometric_graph(num_nodes, ...)

Returns a random geometric graph in the unit cube of dimensions dim.

rustworkx.hyperbolic_random_graph(pos, beta, ...)

Return a hyperbolic random undirected graph (also called hyperbolic geometric graph).

rustworkx.barabasi_albert_graph(n, m[, ...])

Generate a random graph using Barabási–Albert preferential attachment

rustworkx.directed_barabasi_albert_graph(n, m)

Generate a random graph using Barabási–Albert preferential attachment

rustworkx.directed_random_bipartite_graph(...)

Generate a directed random bipartite graph.

rustworkx.undirected_random_bipartite_graph(...)

Generate an undirected random bipartite graph.