\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.3 - dD Range and Segment Trees
CGAL::Tree_anchor< Data, Window > Class Template Reference

#include <CGAL/Tree_base.h>

Inherits from

Tree_base.

Definition

Tree_anchor is also derived from Tree_base.

Therefore, it provides the same methods as Range_tree_d and Segment_tree_d, but does nothing; it can be used as a recursion anchor for those classes. Therefore, instantiate Sublayer_type of Range_tree_d (Segment_tree_d respectively) with Tree_anchor and the container classes for the data items (Data and Window).

Example

The following figures show a number of rectangles and a 2-dimensional segment tree built on them.

segment_ex2.png
Two dimensional interval data and the corresponding segment tree.

Types

typedef unspecified_type Data
 container Data.
 
typedef unspecified_type Window
 container Window.
 

Creation

Tree_anchor< Data, Windowa ()
 

Operations

template<class OutputIterator >
OutputIterator window_query (Window win, OutputIterator result)
 
template<class OutputIterator >
OutputIterator enclosing_query (Window win, OutputIterator result)
 
bool is_valid ()
 returns true;
 
bool is_inside (Window win, Data object)
 returns true.
 
bool is_anchor ()
 returns true.