|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E> edu.uci.ics.jung.algorithms.layout.FRLayout2<V,E>
public class FRLayout2<V,E>
Implements the Fruchterman-Reingold force-directed algorithm for node layout.
This is an experimental attempt at optimizing FRLayout
; if it is successful
it will be folded back into FRLayout
(and this class will disappear).
Behavior is determined by the following settable parameters:
http://i11www.ilkd.uni-karlsruhe.de/teaching/SS_04/visualisierung/papers/fruchterman91graph.pdf
Field Summary |
---|
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout |
---|
graph, initialized, locations, size |
Constructor Summary | |
---|---|
FRLayout2(Graph<V,E> g)
Creates an instance for the specified graph. |
|
FRLayout2(Graph<V,E> g,
Dimension d)
Creates an instance of size d for the specified graph. |
Method Summary | |
---|---|
protected void |
calcAttraction(E e)
|
protected void |
calcPositions(V v)
|
protected void |
calcRepulsion(V v1)
|
boolean |
done()
Returns true once the current iteration has passed the maximum count, MAX_ITERATIONS. |
void |
initialize()
Initializes fields in the node that may not have been set during the constructor. |
boolean |
isIncremental()
This one is an incremental visualization. |
void |
reset()
|
void |
setAttractionMultiplier(double attraction)
Sets the attraction multiplier. |
void |
setMaxIterations(int maxIterations)
Sets the maximum number of iterations. |
void |
setRepulsionMultiplier(double repulsion)
Sets the repulsion multiplier. |
void |
setSize(Dimension size)
When a visualization is resized, it presumably wants to fix the locations of the vertices and possibly to reinitialize its data. |
void |
step()
Moves the iteration forward one notch, calculation attraction and repulsion between vertices and edges and cooling the temperature. |
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout |
---|
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FRLayout2(Graph<V,E> g)
public FRLayout2(Graph<V,E> g, Dimension d)
d
for the specified graph.
Method Detail |
---|
public void setSize(Dimension size)
AbstractLayout
setSize
in interface Layout<V,E>
setSize
in class AbstractLayout<V,E>
public void setAttractionMultiplier(double attraction)
public void setRepulsionMultiplier(double repulsion)
public void reset()
reset
in interface Layout<V,E>
public void initialize()
Layout
initialize
in interface Layout<V,E>
public void step()
step
in interface IterativeContext
protected void calcPositions(V v)
protected void calcAttraction(E e)
protected void calcRepulsion(V v1)
public void setMaxIterations(int maxIterations)
public boolean isIncremental()
public boolean done()
done
in interface IterativeContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |