Function traitgraph::algo::predefined_graphs::create_random_hamiltonian_graph [−][src]
pub fn create_random_hamiltonian_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 hamiltonian 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.