\( \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 4.4 - 2D Arrangements
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Arr_landmarks_point_location< Arrangement, Generator > Class Template Reference

#include <CGAL/Arr_landmarks_point_location.h>

Definition

The Arr_landmarks_point_location class implements a Jump & Walk algorithm, where special points, referred to as "landmarks", are chosen in a preprocessing stage, their place in the arrangement is found, and they are inserted into a data-structure that enables efficient nearest-neighbor search (a Kd-tree). Given a query point, the nearest landmark is located and a "walk" strategy is applied from the landmark to the query point.

There are various strategies to select the landmark set in the arrangement, where the strategy is determined by the Generator template parameter. The following landmark-generator classes are available:

Arr_landmarks_vertices_generator -

The arrangement vertices are used as the landmarks set.

Arr_random_landmarks_generator -

\( n\) random points in the bounding box of the arrangement are chosen as the landmarks set.

Arr_halton_landmarks_generator -

\( n\) Halton points in the bounding box of the arrangement are chosen as the landmarks set.

Arr_middle_edges_landmarks_generator -

The midpoint of each arrangement edge is computed, and the resulting set of points is used as the landmarks set. This generator can be applied only for arrangements of line segments.

Arr_grid_landmarks_generator -
A set of \( n\) landmarks are chosen on a \( \lceil \sqrt{n} \rceil \times \lceil \sqrt{n} \rceil\) grid that covers the bounding box of the arrangement.

The Arr_landmarks_vertices_generator class is the default generator and used if no Generator parameter is specified.

It is recommended to use the landmarks point-location strategy when the application frequently issues point-location queries on a rather static arrangement that the changes applied to it are mainly insertions of curves and not deletions of them.

Is Model Of:

ArrangementPointLocation_2

ArrangementVerticalRayShoot_2

See Also
ArrangementPointLocation_2
ArrangementVerticalRayShoot_2
CGAL::Arr_point_location_result<Arrangement>
CGAL_ARR_POINT_LOCATION_VERSION
Examples:
Arrangement_on_surface_2/consolidated_curve_data.cpp, and Arrangement_on_surface_2/point_location_example.cpp.