Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Definition

An object T of the class Kdtree_d<Interface_traits> is the KD-tree induced by a set of points in d-dimensions.

#include <CGAL/kdtree_d.h>

Types

Kdtree_d<Interface_traits>::Box
represents an axis-parallel box in d-dimensions. The box might be unbounded.

typedef Interface_traits::Point
Point;

typedef list<Point>
List_points;

Creation

Kdtree_d<Interface_traits> kd_tree ( int dim = 2);
construct an empty KD-tree of dimension dim.

Operations

bool kd_tree.is_valid ( bool verbose = false, int level = 0)
perform internal consistency checks to verify the correctness of the KD-tree

void kd_tree.build ( list<Point> &l)
construct the KD-tree from the points stored in l.
Precondition: all the points in l are of dimension no smaller than the dimension of kd_tree itself.

void
kd_tree.search ( back_insert_iterator<List_points> result,
Box & query_box)
return into result all the points of the KD-tree that lie inside query_box


Next: Class declaration of Kdtree_d<Interface_traits>::Box
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.