Crossings Minimization  1.0
order.h File Reference

data structure and function headers for saving/restoring order information. More...

#include "graph.h"
Include dependency graph for order.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  order_struct
 

Typedefs

typedef struct order_structOrderptr
 

Functions

void init_order (Orderptr ord_info)
 
void cleanup_order (Orderptr ord_info)
 
void save_order (Orderptr ord_info)
 
void restore_order (Orderptr ord_info)
 

Detailed Description

data structure and function headers for saving/restoring order information.

Author
Matt Stallmann
Date
2009/07/27
Id
order.h 2 2011-06-07 19:50:41Z mfms

Definition in file order.h.

Typedef Documentation

◆ Orderptr

typedef struct order_struct * Orderptr

Keeps track of order information for each layer; used to save the state for orderings that give minimum crossings or edge crossings.

Function Documentation

◆ cleanup_order()

void cleanup_order ( Orderptr  ord_info)

Deallocates information. ASSUMES: init_order( ord_info ) was previously called

Definition at line 37 of file order.c.

References order_struct::node_ptr_on_layer, order_struct::num_layers, and order_struct::num_nodes_on_layer.

Referenced by main().

◆ init_order()

void init_order ( Orderptr  ord_info)

Allocates information inside the ord_info based on the current graph and saves current (initial) layer ordering

Definition at line 21 of file order.c.

References layers, order_struct::node_ptr_on_layer, order_struct::num_layers, order_struct::num_nodes_on_layer, number_of_layers, layer_struct::number_of_nodes, number_of_nodes, and save_order().

Referenced by main().

Here is the call graph for this function:

◆ restore_order()

void restore_order ( Orderptr  ord_info)

Reaaranges layers of the graph to match the information stored in the order_struct referenced by ord_info.

Definition at line 61 of file order.c.

References layers, order_struct::node_ptr_on_layer, layer_struct::nodes, order_struct::num_layers, order_struct::num_nodes_on_layer, numberOfCrossings(), node_struct::position, and updateAllCrossings().

Referenced by main().

Here is the call graph for this function:

◆ save_order()

void save_order ( Orderptr  ord_info)

Copies information from the current graph configuration into the order_struct referenced by ord_info.

Definition at line 48 of file order.c.

References layers, order_struct::node_ptr_on_layer, layer_struct::nodes, order_struct::num_layers, number_of_layers, and layer_struct::number_of_nodes.

Referenced by init_order(), swapping(), update_best_double(), and update_best_int().