|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.visualize.data.layout.KinkyGraphLayoutPlacer
Utilities for kinky graph layout, processing stage III, for positioning nodes in layout space. Includes crude major and minor dimension placement, kink link straightening, and barycenter centering.
Todo: Eliminate negative priorities, simplifying priority allocation and handling. Do kink link straightening and spreading after priority placement to cleanup minor cases of crooked kinks. Generalize spreading (i.e. trace and shift) portion of kink straightening. Figure out why prioty placement often doesn't converge.
Field Summary | |
static int |
FINE_BALANCE_ITER_MAX
|
static int |
FINE_ITER_MAX
|
static int |
FINE_KINK_ITER_MAX
|
static double |
FINE_SAME
|
Constructor Summary | |
KinkyGraphLayoutPlacer()
|
Method Summary | |
protected static void |
doCrudeMinorLayout(int dim,
Point3 origin,
double extraGap,
GraphNodeOrdering ordering)
Distibutes nodes in ordering in layout space by rank along the specified minor axis, centered about the origin. |
protected static void |
doFinalMinorLayout(int dim,
Point3 origin,
GraphNodeOrdering ordering)
Absolutely positions the ranking nodes by centering it along the specified dimension about the specified origin. |
protected static boolean |
doFineMinorBalance(int dim,
GraphNodeOrdering ordering)
Iteratively sweeps up and down through the ranks of an ordering balancing "dangling" nodes relative to their parents. |
protected static boolean |
doFineMinorBalanceRank(int rankI,
boolean doDown,
int dim,
GraphNodeOrdering ordering)
Balances "dangling" nodes in the target rank relative to their parents in the fixed fixed rank. |
protected static boolean |
doFineMinorBalanceSweep(boolean doDown,
int dim,
GraphNodeOrdering ordering)
Sweeps through the ranks of an ordering in a given direction. |
protected static boolean |
doFineMinorKinks(int dim,
GraphNodeOrdering ordering)
Iteratively sweeps up and down through the ranks of an ordering straightening kink-to-kink links and shifting surrounding nodes. |
protected static boolean |
doFineMinorKinksRank(int rankI,
boolean doDown,
java.util.Set placed,
int dim,
GraphNodeOrdering ordering)
Performs kink-to-kink straighteneing for the nodes in the target rank. |
protected static boolean |
doFineMinorKinksSweep(boolean doDown,
int dim,
java.util.Set placed,
GraphNodeOrdering ordering)
Sweeps through the ranks of an ordering in a given direction. |
protected static void |
doFineMinorLayout(int dim,
GraphNodeOrdering ordering)
Iteratively sweeps up and down the ordering ranks positioning nodes along the specified minor axis based on the position priority of the nodes (see doPrioritizePositions()). |
protected static void |
doFineMinorPriority(GraphNodeOrdering ordering)
Initializes the before and after (friend) priorities of the nodes in an ordering. |
protected static boolean |
doFineMinorRank(int rankI,
boolean doDown,
int dim,
GraphNodeOrdering ordering)
Performs fine layout of target nodes in the target rank of an ordering by moving target nodes towards their fixed rank barycenters. |
protected static boolean |
doFineMinorSweep(boolean doDown,
int dim,
GraphNodeOrdering ordering)
Sweeps through the ranks of an ordering in a given direction. |
protected static double |
doMajorLayout(double origin,
double extraGap,
GraphNodeOrdering ordering)
Distibutes nodes in an ordering by rank along the major layout space axis. |
protected static void |
doMultiEdgeLayout(Size3 kinkSize,
java.util.Collection edges)
Adds kink nodes to multi-edges based on the target node sizes (which includes the inter-node gap) and positions. |
protected static void |
doSelfLoopLayout(Size3 kinkSize,
java.util.Collection edges)
Adds kink nodes to self loop edges based on the target node size (which includes the inter-node gap) and position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double FINE_SAME
public static final int FINE_ITER_MAX
public static final int FINE_KINK_ITER_MAX
public static final int FINE_BALANCE_ITER_MAX
Constructor Detail |
public KinkyGraphLayoutPlacer()
Method Detail |
protected static double doMajorLayout(double origin, double extraGap, GraphNodeOrdering ordering)
origin
- Position of the leading edge of the first rank.extraGap
- Extra gap, positive or negative, added between
adjacent nodes.ordering
- Node ordering to be laid out. Never null.
protected static void doCrudeMinorLayout(int dim, Point3 origin, double extraGap, GraphNodeOrdering ordering)
dim
- The minor dimension (1 or 2).origin
- Origin of the layout in layout space. Never null.extraGap
- Extra gap, positive or negative, added between
adjacent nodes.protected static void doFinalMinorLayout(int dim, Point3 origin, GraphNodeOrdering ordering)
protected static void doSelfLoopLayout(Size3 kinkSize, java.util.Collection edges)
edges
- AbstractGroup of edges possibly containing self-loops.
Never null.protected static void doMultiEdgeLayout(Size3 kinkSize, java.util.Collection edges)
kinkSize
- Edge kink size, in layout space. Never null.edges
- AbstractGroup of edges possibly containing self-loops.
Never null.protected static void doFineMinorLayout(int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorSweep(boolean doDown, int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorRank(int rankI, boolean doDown, int dim, GraphNodeOrdering ordering)
rankI
- The target rank index (0:size-1, depends on doDown).doDown
- If true, the fixed rank is before the target
rank (rankI-1); otherwise, the fixed rank is after it (rankI+1).dim
- The affected position dimension (0:2).ordering
- The target ordering. Never null.
protected static void doFineMinorPriority(GraphNodeOrdering ordering)
protected static boolean doFineMinorKinks(int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorKinksSweep(boolean doDown, int dim, java.util.Set placed, GraphNodeOrdering ordering)
protected static boolean doFineMinorKinksRank(int rankI, boolean doDown, java.util.Set placed, int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorBalance(int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorBalanceSweep(boolean doDown, int dim, GraphNodeOrdering ordering)
protected static boolean doFineMinorBalanceRank(int rankI, boolean doDown, int dim, GraphNodeOrdering ordering)
rankI
- The target rank index (0:size-1, depening on doDown).doDown
- If true, the fixed rank is before the target
rank (rankI-1); otherwise, the fixed rank is after (rankI+1).dim
- The affected position dimension (0:2).ordering
- The target ordering. Never null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |