Class SpringLayout2<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
edu.uci.ics.jung.algorithms.layout.SpringLayout<V,E>
edu.uci.ics.jung.algorithms.layout.SpringLayout2<V,E>
- All Implemented Interfaces:
com.google.common.base.Function<V,Point2D>, Layout<V, E>, IterativeContext, Function<V, Point2D>
The SpringLayout package represents a visualization of a set of nodes. The
SpringLayout, which is initialized with a Graph, assigns X/Y locations to
each node. When called
relax(), the SpringLayout moves the
visualization forward one step.-
Nested Class Summary
Nested classes/interfaces inherited from class SpringLayout
SpringLayout.SpringDimensionChecker, SpringLayout.SpringVertexData -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Point2Dprotected intprotected booleanprotected intFields inherited from class SpringLayout
force_multiplier, lengthFunction, repulsion_range_sq, springVertexData, stretchFields inherited from class AbstractLayout
graph, initialized, locations, size -
Constructor Summary
ConstructorsConstructorDescriptionSpringLayout2(Graph<V, E> g) Constructor for a SpringLayout for a raw graph with associated dimension--the input knows how big the graph is.Constructor for a SpringLayout for a raw graph with associated component. -
Method Summary
Methods inherited from class SpringLayout
calculateRepulsion, getForceMultiplier, getRepulsionRange, getStretch, initialize, isIncremental, relaxEdges, reset, setForceMultiplier, setRepulsionRange, setSize, setStretchMethods inherited from class AbstractLayout
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
currentIteration
protected int currentIteration -
averageCounter
protected int averageCounter -
loopCountMax
protected int loopCountMax -
done
protected boolean done -
averageDelta
-
-
Constructor Details
-
SpringLayout2
-
SpringLayout2
-
-
Method Details
-
step
public void step()Relaxation step. Moves all nodes a smidge.- Specified by:
stepin interfaceIterativeContext- Overrides:
stepin classSpringLayout<V,E>
-
testAverageDeltas
private void testAverageDeltas() -
moveNodes
protected void moveNodes()- Overrides:
moveNodesin classSpringLayout<V,E>
-
done
public boolean done()- Specified by:
donein interfaceIterativeContext- Overrides:
donein classSpringLayout<V,E> - Returns:
- false
-