traitgraph_algo::predefined_graphs

Function create_random_graph

Source
pub fn create_random_graph<Graph: DynamicGraph, Random: Rng>(
    graph: &mut Graph,
    node_amount: usize,
    c: f64,
    random: &mut Random,
)
where Graph::NodeData: Default, Graph::EdgeData: Default,
Expand description

Creates a random graph with the given amount of nodes. Assumes that the graph is empty. The amount of arcs will be c * n * (log(n) + log(log(n))), where n is the amount of nodes.