CGAL 6.1 - dD Range and Segment Trees
|
A tree traits class gives the range tree and segment tree class the necessary type information of the keys and intervals. Further more, they define function objects that allow to access the keys and intervals, and provide comparison functions that are needed for window queries.
CGAL::Range_segment_tree_set_traits_2
CGAL::Range_segment_tree_set_traits_3
CGAL::Range_tree_map_traits_2
CGAL::Range_tree_map_traits_3
CGAL::Segment_tree_map_traits_2
CGAL::Segment_tree_map_traits_3
Example
The following piece of code gives an example of how a traits class might look like, if you have keys that are of the type int
in the first and that are of the type double
in the second dimension.
Types | |
typedef unspecified_type | Key |
The k-dimensional key type. | |
typedef unspecified_type | Interval |
The k-dimensional interval type. | |
typedef unspecified_type | Key_i |
The type in dimension \( i\), with \( 1\leq i
\leq k\). | |
typedef unspecified_type | key_i |
function object providing an operator() that takes an argument of type Key and returns a component of type Key_i . | |
typedef unspecified_type | low_i |
function object providing an operator() that takes an argument of type Interval and returns a component of type Key_i . | |
typedef unspecified_type | high_i |
function object providing an operator() that takes an argument of type Interval and returns a component of type Key_i . | |
typedef unspecified_type | compare_i |
function object providing an operator() that takes two arguments argument \( a\), \( b\) of type Key_i and returns true if \( a<b\), false otherwise. | |