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

Concept KdtreeDTraits

The Kdtree_d class is parameterized with the interface class Traits which defines the abstract interface between the Kdtree_d class and the data (i.e., points). The following requirement catalog lists the primitives, i.e., types, member functions etc., that must be defined for a class that can be used to parameterize kd-trees. Ready-made implementation are available by the Kdtree_d default traits classes.

Definition

A class KdtreeDTraits that satisfies the requirements of an interface class for a Kdtree_d class must provide the following types and operations.

Types

KdtreeDTraits::Point
A type to hold a input item.

Operations

static Comparison_result
t.compare ( int k, Point p0, Point p1)
compare the k-th coordinate of p0 and p1. Return LARGER if p0k > p1k, SMALLER if p0k < p1k, or else EQUAL.

static void t.copy_coord ( int k, Point & dest, Point src)
Copy the k-th coordinate of src to the k-th coordinate of dest.

static int t.dimension ( Point pnt)
return the dimension of pnt


Next: Kdtree_Interface<Point>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
www.cgal.org. Aug 13, 2001.