|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fcmodeler.layout.AbstractLayout | +--fcmodeler.layout.GEMLayout
GEM (Graph EMbedder) is a spring embedder style layout algorithm by A. Frick. See www.frick-consulting.de/publications.html
Inner Class Summary | |
protected class |
GEMLayout.NodeInfo
|
Field Summary | |
protected java.awt.Point |
_center
The barycenter of the graph multiplied by the number of nodes. |
protected int |
_elen
I think this is some sort of scaling constant related to the fact that the algorithm is integer based. |
protected int |
_iteration
|
protected int |
_layoutType
|
protected int |
_MAXATTRACT
|
protected int |
_maxTemp
|
protected GEMLayout.NodeInfo[] |
_nodeData
Node state information. |
protected int[] |
_nodesPermutation
|
protected java.util.Map |
_nodesToIndices
|
protected int |
_numEdges
|
protected int |
_numNodes
|
protected double |
_oscillation
|
protected java.util.Random |
_rand
|
protected double |
_rotation
|
protected boolean |
_statusReport
|
protected int |
_temperature
|
protected boolean |
_verbose
|
protected double |
a_finalTemp
|
protected double |
a_gravity
|
protected double |
a_maxIter
|
protected double |
a_maxTemp
|
protected double |
a_oscillation
|
protected double |
a_rotation
|
protected double |
a_shake
|
protected double |
a_startTemp
|
protected double |
i_finalTemp
|
protected double |
i_gravity
|
protected double |
i_maxIter
|
protected double |
i_maxTemp
|
protected double |
i_oscillation
|
protected double |
i_rotation
|
protected double |
i_shake
|
protected double |
i_startTemp
|
protected double |
o_finalTemp
|
protected double |
o_gravity
|
protected double |
o_maxIter
|
protected double |
o_maxTemp
|
protected double |
o_oscillation
|
protected double |
o_rotation
|
protected double |
o_shake
|
protected double |
o_startTemp
|
Fields inherited from class fcmodeler.layout.AbstractLayout |
_edgesToEdgeFigures, _fcmodeler, _nodes |
Constructor Summary | |
GEMLayout(FCModeler fcmodeler,
int layoutType)
|
Method Summary | |
java.awt.Point |
a_impulse(int nodeIndex,
boolean[] activeNodes,
double shake,
double gravity)
Given a list of nodes to consider, compute the sum of the forces on a node. |
void |
a_round(int impulseFunction)
Loop through all nodes and displace() each once. |
void |
arrange(int impulseFunction)
Move the nodes. |
int |
breadthFirstSearch(int root)
This isn't a breadth first search. |
java.awt.Point |
centerOfMass(java.util.List nodes)
Find the center of mass of a List of nodes. |
void |
circleInsert()
Insert the nodes along the perimeter of a circle. |
void |
computeLayout()
This is the main function which drives the layout. |
void |
displace(int nodeIndex,
java.awt.Point impulse)
Given the previously computed impulse, move the node, update the necessary variables, check for oscillation and rotation, and update the temperatures. |
java.util.List |
getAdjacentNodes(int node,
boolean[] activeNodes)
Build a list of nodes adjacent to the indicated node. |
boolean[] |
getAllActive()
Some functions require a list of nodes that should be considered during calculations. |
boolean[] |
getNoneActive()
like getAllActive() except all nodes are off by default. |
int |
graphCenter()
Find the index of the node that is at the center of the graph. |
java.awt.Point |
impulse(int nodeIndex,
boolean[] activeNodes,
double shake,
double gravity)
Given a list of nodes to consider, compute the sum of the forces on a node. |
void |
init()
Set up some global variables. |
void |
initVertexData(double startTemp)
Set the initial temperature of each node, find the total temperature of the graph, and compute the center point. |
void |
insert()
Insert the nodes. |
void |
moveNodes()
Translate the nodes so that they are all in the correct quadrant and there is no extra padding. |
void |
o_round()
|
void |
optimize()
|
void |
permuteNodes()
Permute the nodes using the Fischer Yates shuffle. |
void |
randomInsert()
Insert the nodes randomly. |
Methods inherited from class fcmodeler.layout.AbstractLayout |
getBoundingBox, getFCModeler, getGraph, getLayoutTarget, layout, layout, placeNode, setFCModeler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean _verbose
protected boolean _statusReport
protected double i_maxTemp
protected double i_startTemp
protected double i_finalTemp
protected double i_maxIter
protected double i_gravity
protected double i_oscillation
protected double i_rotation
protected double i_shake
protected double a_maxTemp
protected double a_startTemp
protected double a_finalTemp
protected double a_maxIter
protected double a_gravity
protected double a_oscillation
protected double a_rotation
protected double a_shake
protected double o_maxTemp
protected double o_startTemp
protected double o_finalTemp
protected double o_maxIter
protected double o_gravity
protected double o_oscillation
protected double o_rotation
protected double o_shake
protected int _elen
protected int _MAXATTRACT
protected int _temperature
protected int _maxTemp
protected java.awt.Point _center
protected double _oscillation
protected double _rotation
protected int _iteration
protected int _numNodes
protected int _numEdges
protected GEMLayout.NodeInfo[] _nodeData
protected int[] _nodesPermutation
protected java.util.Map _nodesToIndices
protected int _layoutType
protected java.util.Random _rand
Constructor Detail |
public GEMLayout(FCModeler fcmodeler, int layoutType)
Method Detail |
public void a_round(int impulseFunction)
public void arrange(int impulseFunction)
public int breadthFirstSearch(int root)
public java.awt.Point centerOfMass(java.util.List nodes)
public void computeLayout()
computeLayout
in class AbstractLayout
public void displace(int nodeIndex, java.awt.Point impulse)
public java.util.List getAdjacentNodes(int node, boolean[] activeNodes)
public boolean[] getAllActive()
public boolean[] getNoneActive()
public int graphCenter()
public java.awt.Point impulse(int nodeIndex, boolean[] activeNodes, double shake, double gravity)
public java.awt.Point a_impulse(int nodeIndex, boolean[] activeNodes, double shake, double gravity)
public void init()
public void initVertexData(double startTemp)
public void insert()
public void optimize()
public void o_round()
public void circleInsert()
public void randomInsert()
public void moveNodes()
public void permuteNodes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |