kD-Tree Assignment

Implement the following interface. The constructor takes all the points to consider. The search method will find and return all the points where the Cartesian distance from center is less than or equal to radius.

/**

The type T should have operator[] and it should be valid to index them

with values in the range of 0 to D-1.

*/

template <typename T,int D>

class KDTree {

// TODO: private declarations

public:

KDTree(std::vector<T> points); // Not a reference. You can mess with this copy.

~KDTree();

std::vector<T> search(const T &center,double radius) const;

};