Class ISOMLayoutAlgorithm<V>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm<V>
-
- org.jungrapht.visualization.layout.algorithms.AbstractIterativeLayoutAlgorithm<V>
-
- org.jungrapht.visualization.layout.algorithms.ISOMLayoutAlgorithm<V>
-
- All Implemented Interfaces:
IterativeLayoutAlgorithm<V>,LayoutAlgorithm<V>,AfterRunnable,ExecutorConsumer,IterativeContext,Threaded
public class ISOMLayoutAlgorithm<V> extends AbstractIterativeLayoutAlgorithm<V> implements IterativeContext
Implements a self-organizing map layout algorithm, based on Meyer's self-organizing graph methods.- Author:
- Yan Biao Boey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classISOMLayoutAlgorithm.Builder<V,T extends ISOMLayoutAlgorithm<V>,B extends ISOMLayoutAlgorithm.Builder<V,T,B>>-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.layout.algorithms.LayoutAlgorithm
LayoutAlgorithm.NoOp<V>
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.layout.algorithms.util.Threaded
Threaded.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleadaptionprotected doublecoolingFactorprotected intepochprotected doubleinitialAdaptionprotected intmaxEpochprotected doubleminAdaptionprotected intminRadiusprotected List<V>queueprotected intradiusprotected intradiusConstantTimeprotected Stringstatus-
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractIterativeLayoutAlgorithm
afterRunnable, cancelled, executor, layoutModel, preRelaxDurationMs, random, shouldPreRelax, threaded
-
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm
after
-
-
Constructor Summary
Constructors Modifier Constructor Description ISOMLayoutAlgorithm()protectedISOMLayoutAlgorithm(ISOMLayoutAlgorithm.Builder<V,?,?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V> ISOMLayoutAlgorithm.Builder<V,?,?>builder()booleandone()Returnstrueif the vertex positions are no longer being updated.StringgetStatus()voidinitialize()voidreset()Resets the layout iteration count to 0, which allows the layout algorithm to continue updating vertex positions.voidstep()Advances the current positions of the graph elements.voidvisit(LayoutModel<V> layoutModel)because the IterativeLayoutAlgorithms use multithreading to continuously update vertex positions, the layoutModel state is saved (during the visit method) so that it can be used continuously-
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractIterativeLayoutAlgorithm
cancel, getExecutor, isThreaded, preRelax, setExecutor, setRandomSeed, setThreaded
-
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm
computeAverageVertexDimension, computeLayoutExtent, expandToFill, runAfter, setAfter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.util.AfterRunnable
runAfter, setAfter
-
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.LayoutAlgorithm
constrained
-
-
-
-
Field Detail
-
maxEpoch
protected int maxEpoch
-
epoch
protected int epoch
-
radiusConstantTime
protected int radiusConstantTime
-
radius
protected int radius
-
minRadius
protected int minRadius
-
adaption
protected double adaption
-
initialAdaption
protected double initialAdaption
-
minAdaption
protected double minAdaption
-
coolingFactor
protected double coolingFactor
-
status
protected String status
-
-
Constructor Detail
-
ISOMLayoutAlgorithm
public ISOMLayoutAlgorithm()
-
ISOMLayoutAlgorithm
protected ISOMLayoutAlgorithm(ISOMLayoutAlgorithm.Builder<V,?,?> builder)
-
-
Method Detail
-
builder
public static <V> ISOMLayoutAlgorithm.Builder<V,?,?> builder()
-
getStatus
public String getStatus()
- Returns:
- the current number of epochs and execution status, as a string.
-
visit
public void visit(LayoutModel<V> layoutModel)
Description copied from class:AbstractIterativeLayoutAlgorithmbecause the IterativeLayoutAlgorithms use multithreading to continuously update vertex positions, the layoutModel state is saved (during the visit method) so that it can be used continuously- Specified by:
visitin interfaceLayoutAlgorithm<V>- Overrides:
visitin classAbstractIterativeLayoutAlgorithm<V>- Parameters:
layoutModel- the mediator between the container for vertices (the Graph) and the mapping from Vertex to Point
-
initialize
public void initialize()
-
step
public void step()
Advances the current positions of the graph elements.- Specified by:
stepin interfaceIterativeContext
-
done
public boolean done()
Returnstrueif the vertex positions are no longer being updated. CurrentlyISOMLayoutstops updating vertex positions after a certain number of iterations have taken place.- Specified by:
donein interfaceIterativeContext- Returns:
trueif the vertex position updates have stopped,falseotherwise
-
reset
public void reset()
Resets the layout iteration count to 0, which allows the layout algorithm to continue updating vertex positions.
-
-