public class LinLog extends BarnesHutLayout
SourceBase.ElementType
Modifier and Type | Field and Description |
---|---|
protected double |
a |
protected double |
aFactor
Default general attraction factor.
|
protected boolean |
edgeBased |
protected double |
k |
protected double |
maxR |
protected double |
r |
protected double |
rFactor
Default general repulsion factor.
|
area, avgLength, center, edges, energies, force, gravity, hi, is3D, lastElementCount, lastStepTime, lo, maxMoveLength, nodeMoveCount, nodes, nodesPerCell, outputNodeStats, outputStats, quality, random, sendMoveEventsEvery, sendNodeInfos, sinkTime, stabilizationLimit, statsOut, theta, time, viewZone
attrSinks, eltsSinks, eventProcessing, eventQueue, sourceId, sourceTime
Constructor and Description |
---|
LinLog()
New "LinLog" 2D Barnes-Hut simulation.
|
LinLog(boolean is3D)
New "LinLog" Barnes-Hut simulation.
|
LinLog(boolean is3D,
Random randomNumberGenerator)
New "LinLog" Barnes-Hut simulation.
|
Modifier and Type | Method and Description |
---|---|
protected void |
chooseNodePosition(NodeParticle n0,
NodeParticle n1)
Choose the best position for a node that was just connected by only one
edge to a cluster of nodes.
|
void |
compute()
Method to call repeatedly to compute the layout.
|
void |
configure(double a,
double r,
boolean edgeBased,
double force) |
String |
getLayoutAlgorithmName()
Name of the layout algorithm.
|
NodeParticle |
newNodeParticle(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.
|
addEdge, addEdgeBreakPoint, addNode, clear, computeArea, edgeAdded, edgeAttributeAdded, edgeAttributeChanged_, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, freezeNode, getBarnesHutTheta, getCenterPoint, getEnergies, getForce, getGravityFactor, getHiPoint, getLastStepTime, getLowPoint, getNodeMovedCount, getQuality, getRandom, getSpatialIndex, getStabilization, getStabilizationLimit, getSteps, getViewZone, graphAttributeAdded, graphAttributeChanged_, graphAttributeChanged, graphAttributeRemoved, graphCleared, ignoreEdge, is3D, moveNode, nodeAdded, nodeAttributeAdded, nodeAttributeChanged_, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved, particleAdded, particleAdded, particleAttributeChanged, particleMarked, particleMoved, particleRemoved, printStats, randomXInsideBounds, randomYInsideBounds, randomZInsideBounds, removeEdge, removeNode, setBarnesHutTheta, setEdgeWeight, setForce, setGravityFactor, setNodeWeight, setSendNodeInfos, setStabilizationLimit, shake, stepBegins, stepFinished
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, manageEvents, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
protected double k
protected double aFactor
protected double rFactor
protected boolean edgeBased
protected double maxR
protected double a
protected double r
public LinLog()
public LinLog(boolean is3D)
is3D
- If true the simulation dimensions count is 3 else 2.public void configure(double a, double r, boolean edgeBased, double force)
public 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
protected void chooseNodePosition(NodeParticle n0, NodeParticle n1)
BarnesHutLayout
chooseNodePosition
in class BarnesHutLayout
n0
- source node of the edge.n1
- target node of the edge.public NodeParticle newNodeParticle(String id)
BarnesHutLayout
newNodeParticle
in class BarnesHutLayout
id
- The identifier of the new node/particle.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses