Module predefined_graphs

Source
Expand description

Algorithms to create certain parameterisable graph classes, like binary trees.

Functionsยง

compute_m_from_n_and_c
Computes the amount of edges in a graph with n nodes, given the hamiltonian edge factor c.
create_binary_tree
Adds a binary tree to the given graph.
create_random_graph
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.
create_random_hamiltonian_graph
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.