java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp2d.layout.Layout
de.grogra.imp2d.layout.ForceBasedLayout
de.grogra.imp2d.layout.DavidsonHarelLayout
- All Implemented Interfaces:
Manageable
,Shareable
A
DavidsonHarelLayout
computes a graph layout based on the
force based DavidsonHarel model.-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.imp2d.layout.ForceBasedLayout
ForceBasedLayout.FBAlgorithm
Nested classes/interfaces inherited from class de.grogra.imp2d.layout.Layout
Layout.Algorithm
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DavidsonHarelLayout.Type
static final SCOType.Field
static final SCOType.Field
Fields inherited from class de.grogra.imp2d.layout.ForceBasedLayout
accuracy$FIELD, connectedNodesSize, count$FIELD, displayTransformation$FIELD, nodesSize, relaxation$FIELD, startWithRandom$FIELD
Fields inherited from class de.grogra.imp2d.layout.Layout
fit$FIELD, transformationSteps$FIELD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeForce
(Edge e, Vector2f force) Computes the attraction force of two nodes connected with Edge eprotected void
computeForce
(Node s, Node t, Vector2f force) Computes the repelling force of two nodes s and tprotected void
setRandomPosition
(Node nodeTemp, Random rnd) Calculating the inital positions of the nodesMethods inherited from class de.grogra.imp2d.layout.ForceBasedLayout
createAlgorithm, setStartWithRandom
Methods 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
-
Field Details
-
$TYPE
-
attractionFactor$FIELD
-
repulsionFactor$FIELD
-
-
Constructor Details
-
DavidsonHarelLayout
public DavidsonHarelLayout()
-
-
Method Details
-
setRandomPosition
Calculating the inital positions of the nodes- Specified by:
setRandomPosition
in classForceBasedLayout
-
computeForce
Computes the repelling force of two nodes s and t- Specified by:
computeForce
in classForceBasedLayout
- Parameters:
s
- the source nodet
- the target nodeforce
- the force in the direction froms
tot
has to be placed in here
-
computeForce
Computes the attraction force of two nodes connected with Edge e- Specified by:
computeForce
in classForceBasedLayout
- Parameters:
e
- an edgeforce
- the force in the direction fromedge.source
toedge.target
has to be placed in here
-
getManageableType
-