giny.util
Class FRLayout

java.lang.Object
  extended byginy.util.AbstractLayout
      extended byginy.util.FRLayout

public class FRLayout
extends AbstractLayout


Nested Class Summary
static class FRLayout.FRVertexData
           
 
Field Summary
protected  cern.colt.map.OpenIntObjectHashMap nodeIndexToFRDataMap
           
 
Fields inherited from class giny.util.AbstractLayout
currentSize, graphView, staticNodes
 
Constructor Summary
FRLayout(GraphView view)
           
 
Method Summary
 void advancePositions()
          Moves the iteration forward one notch, calculation attraction and repulsion between nodes and edges and cooling the temperature.
 void calcAttraction(EdgeView e)
          Calculates the attractions for each edge this should have options to be weighted
 void calcPositions(NodeView node_view)
          This gets called for every NodeView.
 void calcRepulsion(NodeView nv1)
          Finds the replusive forces for a node
 void doLayout()
           
 void forceMove(NodeView picked, int x, int y)
          Allow a node to be forced into position
 FRLayout.FRVertexData getFRData(int v)
           
 FRLayout.FRVertexData getFRData(NodeView v)
           
 java.lang.String getStatus()
          Returns the current temperature and number of iterations elapsed, as a string.
 boolean incrementsAreDone()
          Returns true once the current iteration has passed the maximum count, MAX_ITERATIONS.
protected  void initialize_local_node_view(NodeView 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.
 boolean isIncremental()
          This one is an incremental visualization.
 void setMaxIterations(int maxIterations)
           
 
Methods inherited from class giny.util.AbstractLayout
dontMove, forceMove, getCurrentSize, getNodeView, initialize, initializeLocation, initializeLocations, lockNodes, lockVertex, resize, restart, unlockVertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeIndexToFRDataMap

protected cern.colt.map.OpenIntObjectHashMap nodeIndexToFRDataMap
Constructor Detail

FRLayout

public FRLayout(GraphView view)
Method Detail

doLayout

public void doLayout()
Specified by:
doLayout in class AbstractLayout

getStatus

public java.lang.String getStatus()
Returns the current temperature and number of iterations elapsed, as a string.

Overrides:
getStatus in class AbstractLayout

forceMove

public void forceMove(NodeView picked,
                      int x,
                      int y)
Allow a node to be forced into position


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.

Specified by:
initialize_local in class AbstractLayout

initialize_local_node_view

protected void initialize_local_node_view(NodeView 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_node_view in class AbstractLayout

advancePositions

public void advancePositions()
Moves the iteration forward one notch, calculation attraction and repulsion between nodes and edges and cooling the temperature.

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

calcPositions

public void calcPositions(NodeView node_view)
This gets called for every NodeView.


calcAttraction

public void calcAttraction(EdgeView e)
Calculates the attractions for each edge this should have options to be weighted


calcRepulsion

public void calcRepulsion(NodeView nv1)
Finds the replusive forces for a node


setMaxIterations

public void setMaxIterations(int maxIterations)

getFRData

public FRLayout.FRVertexData getFRData(NodeView v)

getFRData

public FRLayout.FRVertexData getFRData(int v)

isIncremental

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


incrementsAreDone

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