Class FRQuadTree


  • class FRQuadTree
    extends java.lang.Object
    A simple QuadTree for indexing during force calculations in the Fruchterman and Reingold Force-Directed Placement Algorithm.

    See the following paper for the definition of a QuadTree.

    • Raphael Finkel and J.L. Bentley. Quad Trees: A Data Structure for Retrieval on Composite Keys. Acta Informatica, 4(1):1--9, 1974.

    The tree supports adding points one by one and maintains the centroid and total number of points on each tree node.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  FRQuadTree.Node
      The Quad-Tree node.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int NE  
      private static int NW  
      private FRQuadTree.Node root  
      private static int SE  
      private static int SW  
    • Constructor Summary

      Constructors 
      Constructor Description
      FRQuadTree​(Box2D box)
      Create a new tree for a certain area.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FRQuadTree.Node getRoot()
      Get the root node of the tree.
      void insert​(Point2D p)
      Insert a new point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait