Class SpringLayout2<V,E>

All Implemented Interfaces:
com.google.common.base.Function<V,Point2D>, Layout<V,E>, IterativeContext, Function<V,Point2D>

public class SpringLayout2<V,E> extends SpringLayout<V,E>
The SpringLayout package represents a visualization of a set of nodes. The SpringLayout, which is initialized with a Graph, assigns X/Y locations to each node. When called relax(), the SpringLayout moves the visualization forward one step.
  • Field Details

    • currentIteration

      protected int currentIteration
    • averageCounter

      protected int averageCounter
    • loopCountMax

      protected int loopCountMax
    • done

      protected boolean done
    • averageDelta

      protected Point2D averageDelta
  • Constructor Details

    • SpringLayout2

      public SpringLayout2(Graph<V,E> g)
      Constructor for a SpringLayout for a raw graph with associated dimension--the input knows how big the graph is. Defaults to the unit length function.
      Parameters:
      g - the graph on which the layout algorithm is to operate
    • SpringLayout2

      public SpringLayout2(Graph<V,E> g, com.google.common.base.Function<E,Integer> length_function)
      Constructor for a SpringLayout for a raw graph with associated component.
      Parameters:
      g - the Graph to lay out
      length_function - provides a length for each edge
  • Method Details