CauViz.coordIp
— MethodGiven a layer assignment and permutation, decide the coordinates for
each vertex. The objective is to encourage straight edges, especially
for longer edges. This function uses an integer program to decide the
coordinates (although it is solved as a linear program), as described in
Gansner, Emden R., et al.
A technique for drawing directed graphs.
Software Engineering, IEEE Transactions on 19.3 (1993): 214-230.
Arguments:
adj_list Directed graph in adjacency list format
layers Assignment of vertices
layer_verts Dictionary of layer => vertices (final perm.)
orig_n Number of original (non-dummy) vertices
widths Width of each vertex
xsep Minimum seperation between each vertex
Returns:
layer_coords For each layer and vertex, the x-coord
CauViz.layerAssmtDummy
— MethodGiven a layer assignment, introduce dummy vertices to break up
long edges (more than one layer)
Arguments:
orig_adj_list Original directed graph in adjacency list format
layers Assignment of original vertices
CauViz.orderingBarycentric
— MethodGiven a layer assignment, decide a permutation for each layer
that attempts to minimizes edge crossings using the barycenter
method proposed in the Sugiyama paper.
Arguments:
adj_list Directed graph in adjacency list format
layers Assignment of vertices
layer_verts Dictionary of layer => vertices
CauViz.orderingIp
— MethodGiven a layer assignment, decide a permutation for each layer
that minimizes edge crossings using integer programming.
Based on the IP described in
M. Junger, E. K. Lee, P. Mutzel, and T. Odenthal.
A polyhedral approach to the multi-layer crossing minimization problem.
In G. Di Battista, editor, Graph Drawing: 5th International Symposium,
GD ’97, volume 1353 of Lecture Notes in Computer Science, pages 13–24,
Rome, Italy, September 1997. Springer-Verlag.
Arguments:
adj_list Directed graph in adjacency list format
layers Assignment of vertices
layer_verts Dictionary of layer => vertices (initial perm.)
Returns:
new_layer_verts An improved dictionary of layer => vertices (opt. perm.)