cz.cuni.amis.pogamut.defcon.utils.quadtree
Class QuadTree

Package class diagram package QuadTree
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.utils.quadtree.QuadTree
All Implemented Interfaces:
Iterable<QuadTreeNode>

public class QuadTree
extends Object
implements Iterable<QuadTreeNode>

QuadTree implementation. Made iterable for convenience. The order of evaluation is prefix with [ ul, ur, ll, lr ] as the order of nodes.

Author:
Radek 'Black_Hand' Pibil

Constructor Summary
QuadTree(List<? extends Location> vertices)
          Constructor
 
Method Summary
 QuadTreeNode getRoot()
          Retrieves the root node.
 Iterator<QuadTreeNode> iterator()
          Returns the iterator over QuadTree.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuadTree

public QuadTree(List<? extends Location> vertices)
Constructor

Parameters:
vertices - polygon to be represented by the QuadTree.
Method Detail

getRoot

public final QuadTreeNode getRoot()
Retrieves the root node.

Returns:
root node

toString

public String toString()
Overrides:
toString in class Object

iterator

public Iterator<QuadTreeNode> iterator()
Returns the iterator over QuadTree. The order of evaluation is prefix with [ ul, ur, ll, lr ] as the order of nodes.

Specified by:
iterator in interface Iterable<QuadTreeNode>


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.