public class JGraphSelfOrganizingOrganicLayout extends java.lang.Object implements JGraphLayout
maxIterationsMultiple
, which defines the vertices to number
of iterations factor, defaults to 20. maxIterationsMultiple
,startRadius
and
narrowingInterval
.JGraphLayout.Stoppable
Modifier and Type | Field and Description |
---|---|
protected double |
adaption
The current adaption value
|
protected java.awt.geom.Rectangle2D |
bounds
The bounds of the graph prior to the layout
|
protected double[][] |
cellLocation
An array of locally stored X co-ordinate positions for the vertices
|
protected double |
coolingFactor
The rate at which the rate of the change of the graph decreases
|
protected double |
densityFactor
The factor by which the suggest area of the graph bound is multipled by.
|
protected int |
iteration
The current iteration of the layout
|
protected double |
maxAdaption
The start adaption value
|
protected int |
maxIterationsMultiple
The multiple of the number of vertices to find the total number of
iterations of this layout applied.
|
protected double |
minAdaption
The minimum adaption value
|
protected int |
minRadius
The lowest radius value allowed.
|
protected int |
narrowingInterval
The number of iterations after which the radius is decremented.
|
protected int[][] |
neighbours
Local copy of cell neighbours
|
protected int |
radius
The current radius of the layout.
|
protected double |
randomX
The X-coordinate of the random point (termed the random vector in the
paper)
|
protected double |
randomY
The Y-coordinate of the random point (termed the random vector in the
paper)
|
protected java.util.Stack |
stack
A stack of nodes to be visited in the adjustment phase
|
protected int |
startRadius
The radius value at on the first iteration.
|
protected int |
totalIterations
The layout sets this variable to the number of vertices multipled by
maxIterationsMultiple since the number of iterations
required in linear with the number of nodes |
protected java.lang.Object[] |
vertexArray
An array of all vertices to be laid out
|
protected int[] |
vertexDistance
An array of the number of edges any particular node is from the winning
node.
|
protected boolean[] |
vertexVisited
An array of which vertices have been visited during the current
iteration.
|
VERSION
Constructor and Description |
---|
JGraphSelfOrganizingOrganicLayout() |
Modifier and Type | Method and Description |
---|---|
double |
getCoolingFactor() |
double |
getDensityFactor() |
double |
getMaxAdaption() |
int |
getMaxIterationsMultiple() |
double |
getMinAdaption() |
int |
getMinRadius() |
int |
getStartRadius() |
void |
run(JGraphFacade graph)
Runs the ISOM layout using the graph information specified in the facade.
|
void |
setCoolingFactor(double coolingFactor) |
void |
setDensityFactor(double densityFactor) |
void |
setMaxAdaption(double maxAdaption) |
void |
setMaxIterationsMultiple(int maxIterationsMultiple) |
void |
setMinAdaption(double minAdaption) |
void |
setMinRadius(int minRadius) |
void |
setStartRadius(int startRadius) |
java.lang.String |
toString()
Returns
Self Organizing , the name of this algorithm. |
protected void |
updateToRandomNode()
Picks a random point and detemines to the closest nodes to that point
|
protected java.awt.geom.Rectangle2D bounds
protected int totalIterations
maxIterationsMultiple
since the number of iterations
required in linear with the number of nodesprotected int maxIterationsMultiple
protected int iteration
protected int radius
minRadius
as the layout progresses.protected int startRadius
protected int minRadius
protected double densityFactor
protected int narrowingInterval
protected double adaption
protected double maxAdaption
protected double minAdaption
protected double coolingFactor
protected java.util.Stack stack
protected int[][] neighbours
protected java.lang.Object[] vertexArray
protected boolean[] vertexVisited
protected int[] vertexDistance
stack
then its corresponding
value in this array will not be valid.protected double[][] cellLocation
protected double randomX
protected double randomY
public void run(JGraphFacade graph)
run
in interface JGraphLayout
graph
- the facade describing the input graphprotected void updateToRandomNode()
public double getCoolingFactor()
public void setCoolingFactor(double coolingFactor)
coolingFactor
- The coolingFactor to set.public int getMaxIterationsMultiple()
public void setMaxIterationsMultiple(int maxIterationsMultiple)
maxIterationsMultiple
- The maxIterationsMultiple to set.public double getMinAdaption()
public void setMinAdaption(double minAdaption)
minAdaption
- The minAdaption to set.public int getStartRadius()
public void setStartRadius(int startRadius)
startRadius
- The startRadius to set.public double getMaxAdaption()
public void setMaxAdaption(double maxAdaption)
maxAdaption
- The maxAdaption to set.public int getMinRadius()
public void setMinRadius(int minRadius)
minRadius
- The minRadius to set.public double getDensityFactor()
public void setDensityFactor(double densityFactor)
densityFactor
- The densityFactor to set.public java.lang.String toString()
Self Organizing
, the name of this algorithm.toString
in class java.lang.Object
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.