cz.cuni.jagrlib.iface
Interface QuadTree

All Superinterfaces:
Property

public interface QuadTree
extends Property

Interface for Quad-tree data structure.

Since:
0.04
See Also:
QuadTree.java

Nested Class Summary
static interface QuadTree.Inspector
          Quad-tree inspector object.
static class QuadTree.Node
          Quad-tree node.
 
Field Summary
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 void finish()
          Finishes the Quad-tree construction (build-phase).
 int getHeight()
          The Quad-tree region's height.
 int getWidth()
          The Quad-tree region's width.
 void init(int _width, int _height)
          Initializes the Quad-tree.
 QuadTree.Inspector inspector()
          The Quad-tree's inspector.
 java.util.List<java.lang.Object> passOrder()
          Returns lineraized Quad-tree data (null is used as a "descend" symbol).
 QuadTree.Node root()
          Returns the Quad-tree root node.
 void split()
          The current region is non-uniform (used in the build-phase).
 void uniform(java.lang.Object value)
          The current region is uniform (used in the build-phase).
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Method Detail

init

void init(int _width,
          int _height)
Initializes the Quad-tree. Starts the build-phase of a Quad-tree.

Parameters:
_width - The region's width.
_height - The region's height.

getWidth

int getWidth()
The Quad-tree region's width.


getHeight

int getHeight()
The Quad-tree region's height.


split

void split()
The current region is non-uniform (used in the build-phase).


uniform

void uniform(java.lang.Object value)
The current region is uniform (used in the build-phase).

Parameters:
value - The value associated with the current region.

finish

void finish()
Finishes the Quad-tree construction (build-phase). Checks and joins uniform regions.


root

QuadTree.Node root()
Returns the Quad-tree root node.

Returns:
The Quad-tree node or null.

passOrder

java.util.List<java.lang.Object> passOrder()
Returns lineraized Quad-tree data (null is used as a "descend" symbol).

Returns:
The Leaf-node data ordered by a Quad-tree pass (depth-first pass). null plays a role of "descend" symbol.

inspector

QuadTree.Inspector inspector()
The Quad-tree's inspector.

Returns:
The inspector for this Quad-tree instance.