java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp2d.layout.Layout
de.grogra.imp2d.layout.ForceBasedLayout
de.grogra.imp2d.layout.SpringLayout
- All Implemented Interfaces:
Manageable
,Shareable
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionstatic final SpringLayout.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeForce
(Edge e, Vector2f force) Computes the force contribution of an edge.protected void
computeForce
(Node s, Node t, Vector2f force) Computes the force contribution of a pair of nodes.protected void
setRandomPosition
(Node nodeTemp, Random rnd) Methods 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
-
attraction$FIELD
-
repulsion$FIELD
-
-
Constructor Details
-
SpringLayout
public SpringLayout()
-
-
Method Details
-
setRandomPosition
- Specified by:
setRandomPosition
in classForceBasedLayout
-
computeForce
Description copied from class:ForceBasedLayout
Computes the force contribution of an edge. This method is invoked for every edge of the graph.- Specified by:
computeForce
in classForceBasedLayout
- Parameters:
e
- an edgeforce
- the force in the direction fromedge.source
toedge.target
has to be placed in here
-
computeForce
Description copied from class:ForceBasedLayout
Computes the force contribution of a pair of nodes. This method is invoked for every pair of nodes, whether they are connected or not. The computedforce
should be anti-symmetric with respect tos
andt
, i.e., if these parameters are exchanged, the resultingforce
should be the negative of the original force.- 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
-
getManageableType
-