Class CircleLayout<V,E>

java.lang.Object
edu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
edu.uci.ics.jung.algorithms.layout.CircleLayout<V,E>
All Implemented Interfaces:
com.google.common.base.Function<V,Point2D>, Layout<V,E>, Function<V,Point2D>

public class CircleLayout<V,E> extends AbstractLayout<V,E>
A Layout implementation that positions vertices equally spaced on a regular circle.
  • Field Details

    • radius

      private double radius
    • vertex_ordered_list

      private List<V> vertex_ordered_list
    • circleVertexDatas

      protected com.google.common.cache.LoadingCache<V,CircleLayout.CircleVertexData> circleVertexDatas
  • Constructor Details

    • CircleLayout

      public CircleLayout(Graph<V,E> g)
  • Method Details

    • getRadius

      public double getRadius()
      Returns:
      the radius of the circle.
    • setRadius

      public void setRadius(double radius)
      Sets the radius of the circle. Must be called before initialize() is called.
      Parameters:
      radius - the radius of the circle
    • setVertexOrder

      public void setVertexOrder(Comparator<V> comparator)
      Sets the order of the vertices in the layout according to the ordering specified by comparator.
      Parameters:
      comparator - the comparator to use to order the vertices
    • setVertexOrder

      public void setVertexOrder(List<V> vertex_list)
      Sets the order of the vertices in the layout according to the ordering of vertex_list.
      Parameters:
      vertex_list - a list specifying the ordering of the vertices
    • reset

      public void reset()
    • initialize

      public void initialize()
      Description copied from interface: Layout
      Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.
    • getCircleData

      protected CircleLayout.CircleVertexData getCircleData(V v)