Algorithm
Development Kit 1.0

algs.model.kdtree
Interface IVisitKDNode

All Known Implementing Classes:
CounterKDTree, KDTraversal

public interface IVisitKDNode

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

In generic traversals (where the entire tree is visited) the visit(DimensionalNode) method is likely the only one to be invoked. However for some algorithms a particular subtree rooted at a DimensionalNode needs to be processed; in this case, the method to invoke is drain(DimensionalNode).

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

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

Method Detail

visit

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

Parameters:
node - the node being visited.

drain

void drain(DimensionalNode 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.


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.