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(Graph<V,E> g) |
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() |
boolean |
getAdjustForGravity() |
boolean |
getExchangeVertices() |
String |
getStatus() |
void |
initialize()
Initializes fields in the node that may not have
been set during the constructor.
|
boolean |
isIncremental() |
void |
reset() |
void |
setAdjustForGravity(boolean on) |
void |
setDisconnectedDistanceMultiplier(double disconnected_multiplier) |
void |
setExchangeVertices(boolean on)
Enable or disable the local minimum escape technique by
exchanging vertices.
|
void |
setLengthFactor(double length_factor) |
void |
setMaxIterations(int maxIterations) |
void |
setSize(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.
|
apply, getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation
protected Distance<V> distance
protected double diameter
public void setLengthFactor(double length_factor)
length_factor
- a multiplicative factor which partially specifies
the preferred length of an edgepublic void setDisconnectedDistanceMultiplier(double disconnected_multiplier)
disconnected_multiplier
- a multiplicative factor that specifies the fraction of the
graph's diameter to be used as the inter-vertex distance between disconnected verticespublic 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(Dimension size)
AbstractLayout
public void setAdjustForGravity(boolean on)
public boolean getAdjustForGravity()
public void setExchangeVertices(boolean on)
on
- iff the local minimum escape technique is to be enabledpublic boolean getExchangeVertices()
Copyright © 2015. All rights reserved.