Algorithm
Development Kit 1.0

algs.model.kdtree
Class TwoDFactory

java.lang.Object
  extended by algs.model.kdtree.TwoDFactory

public class TwoDFactory
extends java.lang.Object

Produces a TwoD-tree from a given input set using recursive median approach.

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

Constructor Summary
TwoDFactory()
           
 
Method Summary
static TwoDTree generate(IPoint[] points)
          Generate a TwoDTree from the given array of points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoDFactory

public TwoDFactory()
Method Detail

generate

public static TwoDTree generate(IPoint[] points)
Generate a TwoDTree from the given array of points.

If points is null, then return null since the dimensionality is unknown.

All points must have the same dimensionality, otherwise strange behavior may occur. Also, this method is not re-entrant, since the comparators array is regenerated upon each invocation, thus we mark the method as 'synchronized'.

Parameters:
points -

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.