

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +gumbo.visualize.data.layout.KinkyGraphLayoutOrderer
Utilities for kinky graph layout, processing stage II. Include phase I ordering of rank nodes by barycenter, and phase II reversal of equal barycenters, all to minimize local and global edge crossings.
Todo: The current algorithm is extremely slow. Also, it sometimes fails to untwine equal barycenter kinks.
Field Summary  
static double 
ROUGH_NOISE

static int 
ROUGH_PHASE1_ITER_MAX

static int 
ROUGH_PHASE2_ITER_MAX

static double 
ROUGH_SPEED

Constructor Summary  
KinkyGraphLayoutOrderer()

Method Summary  
protected static void 
doRoughMinorLayout(boolean downFirst,
GraphNodeOrdering ordering)
Iteratively reorders nodes in ranks to minimize node link crossings. 
protected static int 
doRoughPhase1(boolean downFirst,
int oldCross,
GraphNodeOrdering ordering)
Iteratively sweeps forward then backward through the ranks of an ordering reducing edge crossings. 
protected static int 
doRoughPhase1Down(GraphNodeOrdering ordering)
Sweeps up through the ranks of an ordering trying to reduce edge crossings. 
protected static int 
doRoughPhase1Rank(int rankI,
boolean doDown,
GraphNodeOrdering ordering)
Reorders nodes in the target rank based on the barycenters of nodes in the fixed rank to reduce edge crossings between the ranks. 
protected static int 
doRoughPhase1Up(GraphNodeOrdering ordering)
Sweeps up through the ranks of an ordering trying to reduce edge crossings. 
protected static int 
doRoughPhase2(boolean downFirst,
GraphNodeOrdering ordering)
Iteratively sweeps forward then backward through the ranks of an ordering reducing edge crossings by reversing same barycenter nodes and redoing phase I. 
protected static int 
doRoughPhase2Down(int oldCross,
GraphNodeOrdering ordering)
Sweeps down through the ranks of an ordering to reverse same barycenters and redo phase 1. 
protected static int 
doRoughPhase2Rank(int rankI,
boolean doDown,
int oldCross,
GraphNodeOrdering ordering)
Reverses same barycenters in the target rank, and redoes phase 1 each time. 
protected static int 
doRoughPhase2Up(int oldCross,
GraphNodeOrdering ordering)
Sweeps up through the ranks of an ordering to reverse same barycenters and redo phase 1. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 
public static final int ROUGH_PHASE1_ITER_MAX
public static final int ROUGH_PHASE2_ITER_MAX
public static final double ROUGH_SPEED
public static final double ROUGH_NOISE
Constructor Detail 
public KinkyGraphLayoutOrderer()
Method Detail 
protected static void doRoughMinorLayout(boolean downFirst, GraphNodeOrdering ordering)
protected static int doRoughPhase1(boolean downFirst, int oldCross, GraphNodeOrdering ordering)
oldCross
 The graph crossing count to be reduced. If negative,
it will be computed from the ordering.
protected static int doRoughPhase1Up(GraphNodeOrdering ordering)
protected static int doRoughPhase1Down(GraphNodeOrdering ordering)
protected static int doRoughPhase1Rank(int rankI, boolean doDown, GraphNodeOrdering ordering)
rankI
 The target rank index (0:size1, depending on doDown).doDown
 If true, the fixed rank is before the target rank
(rankI1); otherwise, the fixed rank is after it (rankI+1).
protected static int doRoughPhase2(boolean downFirst, GraphNodeOrdering ordering)
protected static int doRoughPhase2Up(int oldCross, GraphNodeOrdering ordering)
oldCross
 The graph crossing count to be reduced (>=0).
protected static int doRoughPhase2Down(int oldCross, GraphNodeOrdering ordering)
oldCross
 The graph crossing count to be reduced (>=0).
protected static int doRoughPhase2Rank(int rankI, boolean doDown, int oldCross, GraphNodeOrdering ordering)
rankI
 The target rank index (0:size1, depending on doDown).doDown
 If true, the fixed rank is after the target rank
(rankI+1); otherwise, the fixed rank is before it (rankI1).oldCross
 The graph crossing count to be reduced (>=0).ordering
 The target ordering. Never null.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 