Algorithm
Development Kit 1.0

algs.model.kdtree
Interface IVisitTwoDNode

All Known Implementing Classes:
TwoDTraversal

public interface IVisitTwoDNode

Provides interface to enable traversals over TwoD trees to be defined.

There are two methods provided, to differentiate between the two times that nodes are visited within the kd-tree. First, during normal searching when a point is found to be contained within the range query. Second when an entire subtree is found to be contained. The difference leads to great performance benefits, and the drain method designates that the node is being added "in bulk".

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Method Summary
 void drain(TwoDNode node)
          Specialized behavior during search traversals when an entire sub-tree is visited.
 void visit(TwoDNode node)
          Specialized behavior during traversals for each node being visited.
 

Method Detail

visit

void visit(TwoDNode node)
Specialized behavior during traversals for each node being visited.

Parameters:
node -

drain

void drain(TwoDNode node)
Specialized behavior during search traversals when an entire sub-tree is visited. Typical behavior of this implementation is to immediately call visit() and then perform other computations done only when a node is drained.

Parameters:
node - whose sub-tree rooted at the node is to be visited "in bulk."

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.