Crossings Minimization  1.0
add_edges.c File Reference

Main program for adding random edges to a given dag (usually a tree) in order to achieve a given number of edges. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <assert.h>
#include "graph.h"
#include "graph_io.h"
#include "Statistics.h"
#include "heuristics.h"
#include "random_tree.h"
#include "check_edge_duplication.h"
Include dependency graph for add_edges.c:

Go to the source code of this file.

Functions

static void usage_message (char *prog_name)
 
static void print_stats (void)
 
static void add_edge (Nodeptr upper_node, Nodeptr lower_node)
 
static void make_all_current_edges_exist (void)
 
static void add_edges (int desired_num_edges)
 
int main (int argc, char *argv[])
 

Detailed Description

Main program for adding random edges to a given dag (usually a tree) in order to achieve a given number of edges.

Author
Matt Stallmann, 2011/07/07
Id
add_edges.c 27 2011-07-09 21:22:42Z mfms

Definition in file add_edges.c.

Function Documentation

◆ add_edge()

static void add_edge ( Nodeptr  upper_node,
Nodeptr  lower_node 
)
static

◆ add_edges()

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ make_all_current_edges_exist()

static void make_all_current_edges_exist ( void  )
static

Make it so that when the current edges are checked for existence in the future, the correct answer will be given

Definition at line 118 of file add_edges.c.

References edge_struct::down_node, node_struct::id, master_edge_list, number_of_edges, pair_already_exists(), and edge_struct::up_node.

Referenced by add_edges().

Here is the call graph for this function:

◆ print_stats()

static void print_stats ( void  )
static

Definition at line 39 of file add_edges.c.

References add_data(), DEGREE, free_statistics(), init_statistics(), layers, layer_struct::nodes, number_of_edges, number_of_layers, layer_struct::number_of_nodes, number_of_nodes, and print_statistics().

Referenced by main().

Here is the call graph for this function:

◆ usage_message()

static void usage_message ( char *  prog_name)
static

Definition at line 23 of file add_edges.c.

Referenced by main().