Crossings Minimization  1.0
random_dag.h File Reference

Module for creating a random dag 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_dag (int num_nodes, int num_edges, int num_layers, int branching_factor)
 

Detailed Description

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

Author
Matt Stallmann
Date
2011/06/01
Id
random_dag.h 2 2011-06-07 19:50:41Z mfms

Definition in file random_dag.h.

Function Documentation

◆ create_random_dag()

void create_random_dag ( int  num_nodes,
int  num_edges,
int  num_layers,
int  branching_factor 
)

Creates a random dag with the given number of nodes and layers. Assumes that the nodes and layers of the dag have already been created, and that the master_edge_list contains the edges of the backbone tree

Parameters
branching_factorthe number of chidren of a tree node is a random number in the range [1 .. branching_factor]; a large branching factor means that the variance in degree will be larger. Since the tree forms the backbone of the random dag, the same observation applies to the dag

Definition at line 90 of file random_dag.c.

References add_edge(), create_hash_table_for_pairs(), create_random_tree(), destroy_hash_table_for_pairs(), node_struct::id, node_struct::layer, layers, make_all_current_edges_exist(), master_node_list, layer_struct::nodes, number_of_edges, layer_struct::number_of_nodes, number_of_nodes, and pair_already_exists().

Referenced by main().

Here is the call graph for this function: