public class KKLayout<V,E> extends AbstractLayout<V,E> implements IterativeContext
Modifier and Type | Field and Description |
---|---|
protected double |
diameter
The diameter of the visible graph.
|
protected Distance<V> |
distance
Retrieves graph distances between vertices of the visible graph
|
graph, initialized, locations, size
Constructor and Description |
---|
KKLayout()
Creates an instance which does not initialize the vertex locations.
|
KKLayout(Distance<V> distance)
Creates an instance which does not initialize the vertex locations.
|
KKLayout(Graph<V,E> g)
Creates an instance for the specified graph.
|
KKLayout(Graph<V,E> g,
Distance<V> distance)
Creates an instance for the specified graph and distance metric.
|
Modifier and Type | Method and Description |
---|---|
void |
adjustForGravity()
Shift all vertices so that the center of gravity is located at
the center of the screen.
|
boolean |
done()
Returns true once the current iteration has passed the maximum count.
|
boolean |
getAdjustForGravity()
Returns true if gravity point adjusting is enabled.
|
boolean |
getExchangeVertices()
Returns true if the local minimum escape technique by
exchanging vertices is enabled.
|
java.lang.String |
getStatus()
Returns a string with information about the current status of the algorithm.
|
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() |
void |
setAdjustForGravity(boolean on)
Enable or disable gravity point adjusting.
|
void |
setDisconnectedDistanceMultiplier(double disconnected_multiplier)
Sets a multiplicative factor that specifies the fraction of the graph's diameter to be
used as the inter-vertex distance between disconnected vertices.
|
void |
setExchangeVertices(boolean on)
Enable or disable the local minimum escape technique by
exchanging vertices.
|
void |
setLengthFactor(double length_factor)
Sets a multiplicative factor which
partly specifies the "preferred" length of an edge (L).
|
void |
setMaxIterations(int maxIterations)
Sets the maximum number of iterations.
|
void |
setSize(java.awt.Dimension size)
When a visualization is resized, it presumably wants to fix the
locations of the vertices and possibly to reinitialize its data.
|
void |
step()
Advances one step.
|
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transform
protected Distance<V> distance
protected double diameter
public KKLayout()
public KKLayout(Distance<V> distance)
public void setLengthFactor(double length_factor)
public void setDisconnectedDistanceMultiplier(double disconnected_multiplier)
public java.lang.String getStatus()
public void setMaxIterations(int maxIterations)
public boolean isIncremental()
public boolean done()
done
in interface IterativeContext
public void initialize()
Layout
initialize
in interface Layout<V,E>
public void step()
IterativeContext
step
in interface IterativeContext
public void adjustForGravity()
public void setSize(java.awt.Dimension size)
AbstractLayout
public void setAdjustForGravity(boolean on)
public boolean getAdjustForGravity()
public void setExchangeVertices(boolean on)
public boolean getExchangeVertices()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence