Crossings Minimization  1.0
random_tree.h File Reference

Module for creating a random tree with a given number of nodes and layers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void create_random_tree (int num_nodes, int num_layers, int branching_factor)
 

Detailed Description

Module for creating a random tree with a given number of nodes and layers.

Author
Matt Stallmann
Date
2011/05/30
Id
random_tree.h 2 2011-06-07 19:50:41Z mfms

Definition in file random_tree.h.

Function Documentation

◆ create_random_tree()

void create_random_tree ( int  num_nodes,
int  num_layers,
int  branching_factor 
)

Creates a random tree with the given number of nodes and layers.

Parameters
branching_factorthe number of chidren of a node is a random number in the range [1 .. branching_factor]; a large branching factor means that the variance in degree will be larger.

Definition at line 208 of file random_tree.c.

References add_edge(), add_node_to_layer(), add_node_to_list(), assign_child_layer_and_direction(), create_master_node_list(), create_random_tree(), edge_struct::down_node, node_struct::id, init_layers(), init_node_directions(), node_struct::layer, layers, layers_remaining, main(), master_edge_list, master_node_list, number_of_edges, number_of_layers, layer_struct::number_of_nodes, number_of_nodes, number_of_tree_nodes, writeDot(), and writeOrd().

Referenced by create_random_dag(), and create_random_tree().

Here is the call graph for this function: