jcreek.util.graph.layout
Class SpringEmbedderLayout
java.lang.Object
jcreek.util.graph.layout.SpringEmbedderLayout
- All Implemented Interfaces:
- Layout
- public class SpringEmbedderLayout
- extends java.lang.Object
- implements Layout
Method Summary |
double |
attractiveForce(double optimalDistance,
double actualDistance)
|
java.awt.Rectangle |
getBounds()
|
void |
layout(Graph graph,
Node[] nodes,
java.awt.Rectangle bounds)
Lay out the specified nodes of the graph within the supplied bounds. |
void |
layout(Graph graph,
Node[] nodes,
java.awt.Rectangle bounds,
int iterations)
|
void |
layout(Graph graph,
java.awt.Rectangle bounds)
Lay out the graph within the supplied bounds. |
void |
layout(Graph graph,
java.awt.Rectangle bounds,
int iterations)
|
void |
randomizePositions(Node[] nodes,
java.awt.Rectangle bounds)
|
double |
repulsiveForce(double optimalDistance,
double actualDistance)
|
void |
setBounds(java.awt.Rectangle bounds)
|
void |
setInitialTemperature(double temp)
|
void |
setIterationPause(int delay)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bounds
protected java.awt.Rectangle bounds
graph
protected Graph graph
optimalDistanceConstant
protected double optimalDistanceConstant
initialTemp
protected double initialTemp
iterationPause
protected int iterationPause
SpringEmbedderLayout
public SpringEmbedderLayout()
setIterationPause
public void setIterationPause(int delay)
setInitialTemperature
public void setInitialTemperature(double temp)
layout
public void layout(Graph graph,
java.awt.Rectangle bounds)
- Description copied from interface:
Layout
- Lay out the graph within the supplied bounds.
- Specified by:
layout
in interface Layout
layout
public void layout(Graph graph,
java.awt.Rectangle bounds,
int iterations)
layout
public void layout(Graph graph,
Node[] nodes,
java.awt.Rectangle bounds)
- Description copied from interface:
Layout
- Lay out the specified nodes of the graph within the supplied bounds.
- Specified by:
layout
in interface Layout
randomizePositions
public void randomizePositions(Node[] nodes,
java.awt.Rectangle bounds)
setBounds
public void setBounds(java.awt.Rectangle bounds)
getBounds
public java.awt.Rectangle getBounds()
layout
public void layout(Graph graph,
Node[] nodes,
java.awt.Rectangle bounds,
int iterations)
attractiveForce
public double attractiveForce(double optimalDistance,
double actualDistance)
repulsiveForce
public double repulsiveForce(double optimalDistance,
double actualDistance)
Created at IDI, NTNU by the Artificial Intelligence and Learning group