java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp2d.layout.Layout
de.grogra.imp2d.layout.ForceBasedLayout2
- All Implemented Interfaces:
Manageable
,Shareable
A second
ForceBasedLayout
computes a graph layout based on a
force model. The concrete force model has to be implemented in subclasses.
(e. g. FruchtermanReingold, Eades, DavidsonHarel)- Author:
- Birka Fonkeng
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp2d.layout.Layout
Layout.Algorithm, Layout.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
protected float
protected float
int
int
Fields inherited from class de.grogra.imp2d.layout.Layout
$TYPE, fit$FIELD, transformationSteps$FIELD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Layout.Algorithm
Creates an algorithm for this layout.protected abstract double
getting the fDeltaFactorprotected abstract Point2d
repellingForce
(Node firstNode, Node secondNode) Calculating the repelling force of two nodesprotected abstract void
setRandomPosition
(Node nodeTemp, Random rnd) Calculating the inital positions of the nodesprotected abstract Point2d
springForce
(Node firstNode, Node secondNode) Calculating the spring force of two nodesMethods inherited from class de.grogra.imp2d.layout.Layout
getParam, invoke, setParam, setRedraw, setTransformationSteps
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.persistence.Manageable
getManageableType
-
Field Details
-
fMaxIterations
public int fMaxIterations -
fMaxIterationsTemp
public int fMaxIterationsTemp -
fDistanceMultiplierMin
protected float fDistanceMultiplierMin -
fDistanceMultiplierMax
protected float fDistanceMultiplierMax -
fDistanceMultiplier
protected float fDistanceMultiplier
-
-
Constructor Details
-
ForceBasedLayout2
public ForceBasedLayout2()
-
-
Method Details
-
createAlgorithm
Description copied from class:Layout
Creates an algorithm for this layout.- Specified by:
createAlgorithm
in classLayout
- Returns:
- a new
Algorithm
instance
-
repellingForce
Calculating the repelling force of two nodes -
springForce
Calculating the spring force of two nodes -
getFDeltaFactor
protected abstract double getFDeltaFactor()getting the fDeltaFactor -
setRandomPosition
Calculating the inital positions of the nodes
-