public class LinLog extends BarnesHutLayout
SourceBase.ElementType
Constructor and Description |
---|
LinLog()
New "LinLog" 2D Barnes-Hut simulation.
|
LinLog(boolean is3D)
New "LinLog" Barnes-Hut simulation.
|
LinLog(boolean is3D,
java.util.Random randomNumberGenerator)
New "LinLog" Barnes-Hut simulation.
|
Modifier and Type | Method and Description |
---|---|
void |
compute()
Method to call repeatedly to compute the layout.
|
void |
configure(double a,
double r,
boolean edgeBased,
double force) |
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, 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, stepFinished
addAttributeSink, 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, sendStepBegins
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
public LinLog()
public LinLog(boolean is3D)
is3D
- If true the simulation dimensions count is 3 else 2.public LinLog(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 void configure(double a, double r, boolean edgeBased, double force)
public java.lang.String getLayoutAlgorithmName()
Layout
getLayoutAlgorithmName
in interface Layout
getLayoutAlgorithmName
in class BarnesHutLayout
public void setQuality(double qualityLevel)
Layout
setQuality
in interface Layout
setQuality
in class BarnesHutLayout
qualityLevel
- The quality level, a number between 0 and 1.public void compute()
Layout
This method implements the layout algorithm proper. It must be called in a
loop, until the layout stabilizes. You can know if the layout is stable by
using the Layout.getNodeMovedCount()
method that returns the number of node
that have moved during the last call to step().
The listener is called by this method, therefore each call to step() will also trigger layout events, allowing to reproduce the layout process graphically for example. You can insert the listener only when the layout stabilized, and then call step() anew if you do not want to observe the layout process.
compute
in interface Layout
compute
in class BarnesHutLayout
public NodeParticle newNodeParticle(java.lang.String id)
BarnesHutLayout
newNodeParticle
in class BarnesHutLayout
id
- The identifier of the new node/particle.