public final class TimedSpringEmbedder
extends java.lang.Object
Constructor and Description |
---|
TimedSpringEmbedder(int nodes,
int edges,
int RandSeed)
This constructor creates a spring embedder class with n nodes and m
edges.
|
Modifier and Type | Method and Description |
---|---|
void |
initLayout(double spacing,
double[] nodeX,
double[] nodeY,
double[] nodeRadius,
int[] edgeSourceId,
int[] edgeTargetId,
boolean incremental,
boolean[] lockedNodes,
double degreeModifier,
double[] edgeStrength)
does only initalization part of layout
|
void |
layout(double spacing,
double[] nodeX,
double[] nodeY,
double[] nodeRadius,
int[] edgeSourceId,
int[] edgeTargetId,
boolean incremental,
boolean[] lockedNodes,
double degreeModifier,
double[] edgeStrength,
int realNodeCount,
java.util.List<AbstractContainer> boxes,
LayoutConstraints constr,
java.util.List<LayoutLine> layoutLines) |
void |
timedLayout(double[] nodeX,
double[] nodeY,
double time) |
void |
updateLayoutData(double spacing,
double[] nodeX,
double[] nodeY,
double[] nodeRadius,
boolean[] lockedNodes,
double degreeModifier,
double[] edgeStrength)
updates the graph data
|
public TimedSpringEmbedder(int nodes, int edges, int RandSeed)
nodes
- Number of nodesedges
- Number of edgesRandSeed
- Random seedpublic void layout(double spacing, double[] nodeX, double[] nodeY, double[] nodeRadius, int[] edgeSourceId, int[] edgeTargetId, boolean incremental, boolean[] lockedNodes, double degreeModifier, double[] edgeStrength, int realNodeCount, java.util.List<AbstractContainer> boxes, LayoutConstraints constr, java.util.List<LayoutLine> layoutLines)
spacing
- desired separation of nodes (input)nodeX
- x coordinates of node centers (output,
input when incr=true)nodeY
- y coordinates of node centers (output,
input when incr=true)nodeRadius
- node radius (input)edgeSourceId
- from node index of the edges (input)edgeTargetId
- to node index of the edges (input)incremental
- incremental modelockedNodes
- flag if the node is lockededgeStrength
- the strength of each edge. Default is 1.realNodeCount
- all anodes with indices bigger than this are
considered to be dummy. Repulsive forces are not calculated for dummy nodes.
all edgespublic void initLayout(double spacing, double[] nodeX, double[] nodeY, double[] nodeRadius, int[] edgeSourceId, int[] edgeTargetId, boolean incremental, boolean[] lockedNodes, double degreeModifier, double[] edgeStrength)
spacing
- desired separation of nodes (input)nodeX
- x coordinates of node centers (output,
input when incr=true)nodeY
- y coordinates of node centers (output,
input when incr=true)nodeRadius
- node radius (input)edgeSourceId
- from node index of the edges (input)edgeTargetId
- to node index of the edges (input)incremental
- incremental modelockedNodes
- flag if the node is locked
all edgespublic void updateLayoutData(double spacing, double[] nodeX, double[] nodeY, double[] nodeRadius, boolean[] lockedNodes, double degreeModifier, double[] edgeStrength)
spacing
- desired separation of nodes (input)nodeX
- x coordinates of node centers (output,
input when incr=true)nodeY
- y coordinates of node centers (output,
input when incr=true)nodeRadius
- node radius (input)lockedNodes
- flag if the node is locked
higher temperature means that node is moving slowerpublic void timedLayout(double[] nodeX, double[] nodeY, double time)