java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp2d.layout.Layout
de.grogra.imp2d.layout.ForceBasedLayout
de.grogra.imp2d.layout.FruchtermanReingoldLayout
- All Implemented Interfaces:
Manageable,Shareable
A
FruchtermanReingoldLayout computes a graph layout based on the
force based FruchtermanReingold model.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp2d.layout.ForceBasedLayout
ForceBasedLayout.FBAlgorithmNested classes/interfaces inherited from class de.grogra.imp2d.layout.Layout
Layout.Algorithm -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FruchtermanReingoldLayout.Typestatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.FieldFields inherited from class de.grogra.imp2d.layout.ForceBasedLayout
accuracy$FIELD, connectedNodesSize, count$FIELD, displayTransformation$FIELD, nodesSize, relaxation$FIELD, startWithRandom$FIELDFields inherited from class de.grogra.imp2d.layout.Layout
fit$FIELD, transformationSteps$FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeForce(Edge e, Vector2f force) Calculating the attraction force of two nodes connected by an edge eprotected voidcomputeForce(Node s, Node t, Vector2f force) Calculating the repelling force of two nodes s and tprotected voidsetRandomPosition(Node nodeTemp, Random rnd) Calculating and setting the inital positions of the nodesMethods inherited from class de.grogra.imp2d.layout.ForceBasedLayout
createAlgorithm, setStartWithRandomMethods inherited from class de.grogra.imp2d.layout.Layout
getParam, invoke, setParam, setRedraw, setTransformationStepsMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
frameX$FIELD
-
frameY$FIELD
-
scaleFactor$FIELD
-
-
Constructor Details
-
FruchtermanReingoldLayout
public FruchtermanReingoldLayout()
-
-
Method Details
-
setRandomPosition
Calculating and setting the inital positions of the nodes- Specified by:
setRandomPositionin classForceBasedLayout
-
computeForce
Calculating the repelling force of two nodes s and t- Specified by:
computeForcein classForceBasedLayout- Parameters:
s- the source nodet- the target nodeforce- the force in the direction fromstothas to be placed in here
-
computeForce
Calculating the attraction force of two nodes connected by an edge e- Specified by:
computeForcein classForceBasedLayout- Parameters:
e- an edgeforce- the force in the direction fromedge.sourcetoedge.targethas to be placed in here
-
getManageableType
-