CGAL::Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS>

Definition

We provide an alternative to the class Segment_Voronoi_diagram_2<Gt,DS> for the incremental construction of the segment Voronoi diagram. The Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> class maintains a hierarchy of Voronoi diagrams. There are two possibilities as to how this hierarchy is constructed.

In the first case the bottom-most level of the hierarchy contains the full segment Voronoi diagram. The upper levels of the hierarchy contain only points that are either point sites or endpoints of segment sites in the bottom-most Voronoi diagram. A point that is in level i (either as an individdual point or as the endpoint of a segment), is inserted in level i+1 with probability 1/ where >1 is some constant. In the second case the upper levels of the hierarchy contains not only points but also segments. A site that is in level i, is in level i+1 with probability 1/ where > 1 is some constant.

The difference between the Segment_Voronoi_diagram_2<Gt,DS> class and the Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> class (both versions of it) is on how the nearest neighbor location is done. Given a point p the location is done as follows: at the top most level we find the nearest neighbor of p as in the Segment_Voronoi_diagram_2<Gt,DS> class. At every subsequent level i we use the nearest neighbor found at level i+1 to find the nearest neighbor at level i. This is a variant of the corresponding hierarchy for points found in [Dev02]. The details are described in [Kar04].

The class has three template parameters. The first and third have essentially the same semantics as in the Segment_Voronoi_diagram_2<Gt,DS> class. The first template parameter must be a model of the SegmentVoronoiDiagramTraits_2 concept. The third template parameter must be a model of the SegmentVoronoiDiagramDataStructure_2 concept. However, the vertex base class that is to be used in the segment Voronoi diagram data structure must be a model of the SegmentVoronoiDiagramHierarchyVertexBase_2 concept. The third template parameter defaults to Triangulation_data_structure_2< Segment_Voronoi_diagram_hierarchy_vertex_base_2< Segment_Voronoi_diagram_vertex_base_2<Gt> >, Triangulation_face_base_2<Gt> >. The second template parameter controls whether or not segments are added in the upper levels of the hierarchy. It's possible values are CGAL::Tag_true and CGAL::Tag_false. If it is set to CGAL::Tag_true, segments are also inserted in the upper levels of the hierarchy. The value CGAL::Tag_false indicates that only points are to be inserted in the upper levels of the hierarchy. The default value for the second template parameter is CGAL::Tag_false.

The Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> class derives publicly from the Segment_Voronoi_diagram_2<Gt,DS> class. The interface is the same with its base class. In the sequel only additional types and methods defined are documented.

#include <CGAL/Segment_Voronoi_diagram_hierarchy_2.h>

Is Model for the Concept

DefaultConstructible
CopyConstructible
Assignable

Inherits From

CGAL::Segment_Voronoi_diagram_2<Gt,DS>

Types

Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> introduces the following types in addition to those introduced by its base class Segment_Voronoi_diagram_2<Gt,DS>.

typedef STag Segments_in_hierarchy_tag;
A type for the STag template parameter.
typedef CGAL::Segment_Voronoi_diagram_2<Gt,DS>
Base; A type for the base class.

Creation

In addition to the default and copy constructors, the following constructors are defined:

Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> svdh ( Gt gt=Gt());
Creates a hierarchy of segment Voronoi diagrams using gt as geometric traits.

template< class Input_iterator >
Segment_Voronoi_diagram_hierarchy_2<Gt,STag,DS> svdh ( Input_iterator first,
Input_iterator beyond,
Gt gt=Gt());
Creates a segment Voronoi diagram hierarchy using gt as geometric traits and inserts all sites in the range [first, beyond). Input_iterator must be a model of InputIterator. The value type of Input_iterator must be either Point_2 or Site_2.

See Also

SegmentVoronoiDiagramDataStructure_2
SegmentVoronoiDiagramTraits_2
SegmentVoronoiDiagramHierarchyVertexBase_2
CGAL::Segment_Voronoi_diagram_2<Gt,DS>
CGAL::Triangulation_data_structure_2<Vb,Fb>
CGAL::Segment_Voronoi_diagram_traits_2<K,MTag>
CGAL::Segment_Voronoi_diagram_traits_without_intersections_2<K,MTag>
CGAL::Segment_Voronoi_diagram_filtered_traits_2<CK,CM,EK,EM,FK,FM>
CGAL::Segment_Voronoi_diagram_filtered_traits_without_intersections_2<CK,CM,EK,EM,FK,FM>
CGAL::Segment_Voronoi_diagram_hierarchy_vertex_base_2<Vbb>