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

## CGAL::Kd_tree_rectangle<Traits>

| advanced |

### Definition

The class Kd_tree_rectangle<Traits> implements d-dimensional iso-rectangles and related operations, e.g., methods to compute bounding boxes of point sets.

#include <CGAL/Kd_tree_rectangle.h>

### Types

Traits::FT | FT; | Number type.

### Creation

Kd_tree_rectangle<Traits> r ( int d);
| Constructs a d-dimensional rectangle r with lower bound and upper bound set to zero in each dimension.
template <class PointIter>
Kd_tree_rectangle<Traits> r ( int d, PointIter begin, PointIter end);
| Constructs the bounding box of the points in the range [begin,end), where the value type of PointIter must be Traits::Point_d.

### Operations

FT | r.min_coord ( int i)
|  | Returns the lower bound of the rectangle in dimension i.
FT | r.max_coord ( int i)
|  | Returns the upper bound of the rectangle in dimension i.
void | r.set_upper_bound ( int i, FT x)
|  | Sets upper bound in dimension i to x.
void | r.set_lower_bound ( int i, FT x)
|  | Sets lower bound in dimension i to x.
FT | r.max_span () | Returns the maximal span of the rectangle.
FT | r.max_span_coord ()
|  | Returns the smallest coordinate for which the rectangle has its maximal span.
int | r.dimension () | Returns the dimension of the rectangle.
void | r.split ( & r, int d, FT value)
|  | Splits rectangle in dimension d at coordinate-value value by modifying itself to lower half and by modifying r to upper half.

### Output Routines

template<class FT>
std::ostream& | std::ostream& s << & r
|  | Inserts rectangle r in the output stream s and returns s.

| advanced |

Next: Manhattan_distance_iso_box_point<Traits>

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

The CGAL Project . Tue, December 21, 2004 .