Function graph_generators::barabasi_albert_graph
[−]
[src]
pub fn barabasi_albert_graph<R: Rng>(rng: &mut R, n: usize, m: usize) -> Graph
Generate a random, scale-free graph according to the Barabási–Albert preferential attachment model.
rng: Random number generator to use. n: Total number of nodes. m: Number of edges to existing nodes for each newly added node.
TODO: Allow generation of undirected graphs.