Crossings Minimization  1.0
stretch.c File Reference

implementation of utilities for computing and updating the "stretch" of edges, where stretch is of edge vw is defined to be abs( p(v)/(|L(v)|-1) - p(w)/(|L(w)|-1) ) Here p(x), L(x) are the position and layer of x, respectively; if there is only one node on a layer, the denominator is replaced by 2. More...

#include <stdio.h>
#include <math.h>
#include "graph.h"
#include "stretch.h"
Include dependency graph for stretch.c:

Go to the source code of this file.

Functions

double stretch (Edgeptr e)
 

Detailed Description

implementation of utilities for computing and updating the "stretch" of edges, where stretch is of edge vw is defined to be abs( p(v)/(|L(v)|-1) - p(w)/(|L(w)|-1) ) Here p(x), L(x) are the position and layer of x, respectively; if there is only one node on a layer, the denominator is replaced by 2.

Definition in file stretch.c.

Function Documentation

◆ stretch()

double stretch ( Edgeptr  e)
Returns
the stretch of edge e

Definition at line 15 of file stretch.c.

References edge_struct::down_node, node_struct::layer, layers, node_struct::name, layer_struct::number_of_nodes, node_struct::position, stretch(), and edge_struct::up_node.

Referenced by maxEdgeStretchInChannel(), maxStretchEdge(), stretch(), and totalChannelStretch().

Here is the call graph for this function: