scratch.scott
Class FastScalableMDS

java.lang.Object
  extended by edu.uci.ics.jung.visualization.AbstractLayout
      extended by scratch.scott.FastScalableMDS
All Implemented Interfaces:
ChangeEventSupport, Layout, VertexLocationFunction

public class FastScalableMDS
extends AbstractLayout

Author:
Scott White

Field Summary
protected  double diameter
          The diameter of the visible graph.
protected  UnweightedShortestPath unweightedShortestPaths
          Stores graph distances between vertices of the visible graph
 
Fields inherited from class edu.uci.ics.jung.visualization.AbstractLayout
changeSupport, vertex_locations
 
Constructor Summary
FastScalableMDS(Graph g)
           
 
Method Summary
 void advancePositions()
          Implementors must override this method in order to create a Layout.
 String getStatus()
          Returns the current status of the sytem, or null if there is no particular status to report.By default, an AbstractLayout returns null for its status.
 boolean incrementsAreDone()
          Returns true once the current iteration has passed the maximum count.
protected  void initialize_local_vertex(Vertex v)
          Initializes the local information on a single vertex.
protected  void initialize_local()
          Initializes all local information, and is called immediately within the initialize() process.
protected  void initializeLocations()
          This method calls initialize_local_vertex for each vertex, and also adds initial coordinate information for each vertex.
 boolean isIncremental()
          This one is an incremental visualization.
 void setMaxIterations(int maxIterations)
           
 
Methods inherited from class edu.uci.ics.jung.visualization.AbstractLayout
addChangeListener, applyFilter, dontMove, fireStateChanged, forceMove, getAVertex, getBaseKey, getChangeListeners, getCoordinates, getCurrentSize, getEdge, getEdge, getGraph, getLocation, getVertex, getVertex, getVertexIterator, getVisibleEdges, getVisibleGraph, getVisibleVertices, getX, getY, initialize, initialize, initializeLocation, isLocked, lockVertex, offsetVertex, postInitialize, removeChangeListener, resize, restart, unlockVertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diameter

protected double diameter
The diameter of the visible graph. In other words, length of the longest shortest path between any two vertices of the visible graph.


unweightedShortestPaths

protected UnweightedShortestPath unweightedShortestPaths
Stores graph distances between vertices of the visible graph

Constructor Detail

FastScalableMDS

public FastScalableMDS(Graph g)
Method Detail

advancePositions

public void advancePositions()
Description copied from class: AbstractLayout
Implementors must override this method in order to create a Layout. If the Layout is the sort that only calculates locations once, this method may be overridden with an empty method.

Note that "locked" vertices are not to be moved; however, it is the policy of the visualization to decide how to handle them, and what to do with the vertices around them. Prototypical code might include a clipping like

  for (Iterator i = getVertices().iterator(); i.hasNext() ) { Vertex v = (Vertex) i.next(); if (! dontmove.contains( v ) ) { ... // handle the node } else { // ignore the node } }
 

Specified by:
advancePositions in interface Layout
Specified by:
advancePositions in class AbstractLayout
See Also:
Layout.advancePositions()

getStatus

public String getStatus()
Description copied from class: AbstractLayout
Returns the current status of the sytem, or null if there is no particular status to report. Useful for reporting things like number of iterations passed, temperature, and so on.By default, an AbstractLayout returns null for its status.

Specified by:
getStatus in interface Layout
Overrides:
getStatus in class AbstractLayout
Returns:
the status, as a string

incrementsAreDone

public boolean incrementsAreDone()
Returns true once the current iteration has passed the maximum count.


initialize_local

protected void initialize_local()
Description copied from class: AbstractLayout
Initializes all local information, and is called immediately within the initialize() process. The user is responsible for overriding this method to do any construction that may be necessary: for example, to initialize local per-edge or graph-wide data.

Overrides:
initialize_local in class AbstractLayout

initialize_local_vertex

protected void initialize_local_vertex(Vertex v)
Description copied from class: AbstractLayout
Initializes the local information on a single vertex. The user is responsible for overriding this method to do any vertex-level construction that may be necessary: for example, to attach vertex-level information to each vertex.

Specified by:
initialize_local_vertex in class AbstractLayout

initializeLocations

protected void initializeLocations()
Description copied from class: AbstractLayout
This method calls initialize_local_vertex for each vertex, and also adds initial coordinate information for each vertex. (The vertex's initial location is set by calling initializeLocation.

Overrides:
initializeLocations in class AbstractLayout

isIncremental

public boolean isIncremental()
This one is an incremental visualization.


setMaxIterations

public void setMaxIterations(int maxIterations)