Crossings Minimization  1.0
channel.h File Reference

implementation of utilities that maintain information about channels; eventually these will replace the interlayer structures in crossings.c since they serve more general purposes. More...

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

Go to the source code of this file.

Data Structures

struct  channel_struct
 

Typedefs

typedef struct channel_structChannelptr
 

Functions

void initChannels (void)
 
double totalChannelStretch (int i)
 
double totalLayerStretch (int i)
 
double maxEdgeStretchInChannel (int i)
 
double totalStretch ()
 
double maxEdgeStretch ()
 
Edgeptr maxStretchEdge ()
 

Variables

Channelptrchannels
 

Detailed Description

implementation of utilities that maintain information about channels; eventually these will replace the interlayer structures in crossings.c since they serve more general purposes.

header for utilities that maintain information about channels

Todo:
eventually channels should replace the interlayer structures in crossings.c since can they serve more general purposes; note that the current discipline in crossings.[ch] is that, when an iteration sorts a layer, the crossings for the adjoining channels are updated, including the max crossings node and edge; here, we do this with stretch and leave the crossings updates alone for now.

Definition in file channel.h.

Typedef Documentation

◆ Channelptr

typedef struct channel_struct * Channelptr

Information about edges in the channel between two layers. Channels are numbered starting at 1 (for the channel between layers 0 and 1).

Function Documentation

◆ initChannels()

void initChannels ( void  )

initializes data structures relevant to channels

Definition at line 57 of file channel.c.

References initChannel(), and number_of_layers.

Referenced by main().

Here is the call graph for this function:

◆ maxEdgeStretch()

double maxEdgeStretch ( )
Returns
the maximu stretch of any edge overall
the maximum stretch among all edges

Definition at line 126 of file channel.c.

References iteration, maxEdgeStretchInChannel(), and number_of_layers.

Referenced by capture_beginning_stats(), capture_preprocessing_stats(), and update_best_all().

Here is the call graph for this function:

◆ maxEdgeStretchInChannel()

double maxEdgeStretchInChannel ( int  i)
Returns
the maximum stretch of any edge in channel i; assumes positions of nodes in the two layers have been updated correctly
the total stretch of edges in channel i; assumes the positions of nodes on the two layers have been updated correctly

Definition at line 95 of file channel.c.

References channel_struct::number_of_edges, and stretch().

Referenced by maxEdgeStretch().

Here is the call graph for this function:

◆ maxStretchEdge()

Edgeptr maxStretchEdge ( )
Returns
the edge with maximum stretch among edges that have not been fixed

Definition at line 146 of file channel.c.

References genrand_permute(), isFixedEdge(), master_edge_list, number_of_edges, randomize_order, and stretch().

Referenced by maximumStretchEdge().

Here is the call graph for this function:

◆ totalChannelStretch()

double totalChannelStretch ( int  i)
Returns
the total strech of edges in channel i; assumes the positions of nodes on the two layers have been updated correctly
the total stretch of edges in channel i; assumes the positions of nodes on the two layers have been updated correctly

Definition at line 69 of file channel.c.

References channel_struct::number_of_edges, stretch(), and total_stretch.

Referenced by totalLayerStretch(), and totalStretch().

Here is the call graph for this function:

◆ totalLayerStretch()

double totalLayerStretch ( int  i)
Returns
the total stretch of edges incident on layer i

Definition at line 80 of file channel.c.

References number_of_layers, total_stretch, and totalChannelStretch().

Referenced by sift_node_for_total_stretch().

Here is the call graph for this function:

◆ totalStretch()

double totalStretch ( )
Returns
the total stretch of all edges

Definition at line 109 of file channel.c.

References iteration, number_of_layers, total_stretch, and totalChannelStretch().

Referenced by capture_beginning_stats(), capture_preprocessing_stats(), trace_printer(), and update_best_all().

Here is the call graph for this function:

Variable Documentation

◆ channels

Channelptr* channels

channels[i] is information about edges between layers i - 1 and i; the entry for i = 0 is not used

Definition at line 17 of file channel.c.