Class ISOMLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.ISOMLayout<V,E>
-
- All Implemented Interfaces:
com.google.common.base.Function<V,java.awt.geom.Point2D>
,Layout<V,E>
,IterativeContext
,java.util.function.Function<V,java.awt.geom.Point2D>
public class ISOMLayout<V,E> extends AbstractLayout<V,E> implements IterativeContext
Implements a self-organizing map layout algorithm, based on Meyer's self-organizing graph methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ISOMLayout.ISOMVertexData
-
Field Summary
Fields Modifier and Type Field Description private double
adaption
private double
coolingFactor
protected GraphElementAccessor<V,E>
elementAccessor
private int
epoch
private double
initialAdaption
protected com.google.common.cache.LoadingCache<V,ISOMLayout.ISOMVertexData>
isomVertexData
private int
maxEpoch
private double
minAdaption
private int
minRadius
private java.util.List<V>
queue
private int
radius
private int
radiusConstantTime
private java.lang.String
status
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size
-
-
Constructor Summary
Constructors Constructor Description ISOMLayout(Graph<V,E> g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
adjust()
private void
adjustVertex(V v, java.awt.geom.Point2D tempXYD)
boolean
done()
Returnstrue
if the vertex positions are no longer being updated.protected ISOMLayout.ISOMVertexData
getISOMVertexData(V v)
java.lang.String
getStatus()
void
initialize()
Initializes fields in the node that may not have been set during the constructor.boolean
isIncremental()
This one is an incremental visualization.void
reset()
Resets the layout iteration count to 0, which allows the layout algorithm to continue updating vertex positions.void
step()
Advances the current positions of the graph elements.private void
updateParameters()
-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSize
-
-
-
-
Field Detail
-
isomVertexData
protected com.google.common.cache.LoadingCache<V,ISOMLayout.ISOMVertexData> isomVertexData
-
maxEpoch
private int maxEpoch
-
epoch
private int epoch
-
radiusConstantTime
private int radiusConstantTime
-
radius
private int radius
-
minRadius
private int minRadius
-
adaption
private double adaption
-
initialAdaption
private double initialAdaption
-
minAdaption
private double minAdaption
-
elementAccessor
protected GraphElementAccessor<V,E> elementAccessor
-
coolingFactor
private double coolingFactor
-
queue
private java.util.List<V> queue
-
status
private java.lang.String status
-
-
Method Detail
-
getStatus
public java.lang.String getStatus()
- Returns:
- the current number of epochs and execution status, as a string.
-
initialize
public void initialize()
Description copied from interface:Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.- Specified by:
initialize
in interfaceLayout<V,E>
-
step
public void step()
Advances the current positions of the graph elements.- Specified by:
step
in interfaceIterativeContext
-
adjust
private void adjust()
-
updateParameters
private void updateParameters()
-
adjustVertex
private void adjustVertex(V v, java.awt.geom.Point2D tempXYD)
-
getISOMVertexData
protected ISOMLayout.ISOMVertexData getISOMVertexData(V v)
-
isIncremental
public boolean isIncremental()
This one is an incremental visualization.- Returns:
true
is the layout algorithm is incremental,false
otherwise
-
done
public boolean done()
Returnstrue
if the vertex positions are no longer being updated. CurrentlyISOMLayout
stops updating vertex positions after a certain number of iterations have taken place.- Specified by:
done
in interfaceIterativeContext
- Returns:
true
if the vertex position updates have stopped,false
otherwise
-
-