public class FRLayout<V,E> extends AbstractLayout<V,E> implements IterativeContext
Behavior is determined by the following settable parameters:
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FRLayout.FRVertexData |
graph, initialized, locations, size| Constructor and Description |
|---|
FRLayout()
Creates an instance which does not initialize the vertex locations.
|
FRLayout(Graph<V,E> g)
Creates an instance for the specified graph.
|
FRLayout(Graph<V,E> g,
java.awt.Dimension d)
Creates an instance of size
d for the specified graph. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected FRLayout.FRVertexData |
getFRData(V v) |
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(java.awt.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.
|
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transformpublic FRLayout()
public void setSize(java.awt.Dimension size)
AbstractLayoutpublic void setAttractionMultiplier(double attraction)
public void setRepulsionMultiplier(double repulsion)
public void initialize()
Layoutinitialize in interface Layout<V,E>public void step()
step in interface IterativeContextprotected void calcPositions(V v)
protected void calcAttraction(E e)
protected void calcRepulsion(V v1)
public void setMaxIterations(int maxIterations)
protected FRLayout.FRVertexData getFRData(V v)
public boolean isIncremental()
public boolean done()
done in interface IterativeContextCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence