public class SpringBox extends BarnesHutLayout
This layout is the default GraphStream layout that handles dynamic graphs. It
can constantly evolve according to the changes in the graph. And works well
with the LayoutRunner class so that the computations stops when the
layout is stable enougth.
This algorithm is based on the Frutcherman-Reingold force layout algorithm modified on the attraction (the degree of nodes is taken into account to stabilize the layout as we are not only interested in the result, but also in the steps in between).
SourceBase.ElementType| Constructor and Description |
|---|
SpringBox()
New "Spring-Box" 2D Barnes-Hut simulation.
|
SpringBox(boolean is3D)
New "Spring-Box" Barnes-Hut simulation.
|
SpringBox(boolean is3D,
java.util.Random randomNumberGenerator)
New "Spring-Box" Barnes-Hut simulation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLayoutAlgorithmName()
Name of the layout algorithm.
|
NodeParticle |
newNodeParticle(java.lang.String id)
Factory method to create node particles.
|
void |
setQuality(double qualityLevel)
Set the overall quality level, a number between 0 and 1 with 1 the highest
quality available, but often with a slower computation.
|
clear, compute, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, freezeNode, getBarnesHutTheta, getCenterPoint, getEnergies, getForce, getGravityFactor, getHiPoint, getLastStepTime, getLowPoint, getNodeMovedCount, getQuality, getRandom, getSpatialIndex, getStabilization, getStabilizationLimit, getSteps, getViewZone, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, is3D, moveNode, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved, particleAdded, particleAdded, particleAttributeChanged, particleMarked, particleMoved, particleRemoved, randomXInsideBounds, randomYInsideBounds, randomZInsideBounds, setBarnesHutTheta, setForce, setGravityFactor, setSendNodeInfos, setStabilizationLimit, shake, stepBegins, stepFinishedaddAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBeginsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSinkpublic SpringBox()
public SpringBox(boolean is3D)
is3D - If true the simulation dimensions count is 3 else 2.public SpringBox(boolean is3D,
java.util.Random randomNumberGenerator)
is3D - If true the simulation dimensions count is 3 else 2.randomNumberGenerator - The random number generator to use.public java.lang.String getLayoutAlgorithmName()
LayoutgetLayoutAlgorithmName in interface LayoutgetLayoutAlgorithmName in class BarnesHutLayoutpublic void setQuality(double qualityLevel)
LayoutsetQuality in interface LayoutsetQuality in class BarnesHutLayoutqualityLevel - The quality level, a number between 0 and 1.public NodeParticle newNodeParticle(java.lang.String id)
BarnesHutLayoutnewNodeParticle in class BarnesHutLayoutid - The identifier of the new node/particle.