CGAL 6.1 - 2D Voronoi Diagram Adaptor

Loading...
Searching...
No Matches
List of all members
AdaptationPolicy_2 Concept Reference
Reference Manual » Concepts

## Definition

The concept `AdaptationPolicy_2` defines the requirements on the predicate functors that determine whether a feature of the triangulated Delaunay graph should be rejected or not. It also provides a functor for inserting sites in the Delaunay graph. The last functor is optional and a tag determines whether it is provided or not. Note that while the first two functors do not modify the Delaunay graph they take as an argument, the last ones does.

Refines
  `CopyConstructible`
  `Assignable`
  `DefaultConstructible`

Has models
  `CGAL::Identity_policy_2<DG,AT>`
  `CGAL::Apollonius_graph_degeneracy_removal_policy_2<AG2>`
  `CGAL::Apollonius_graph_caching_degeneracy_removal_policy_2<AG2>`
  `CGAL::Delaunay_triangulation_degeneracy_removal_policy_2<DT2>`
  `CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2<DT2>`
  `CGAL::Regular_triangulation_degeneracy_removal_policy_2<RT2>`
  `CGAL::Regular_triangulation_caching_degeneracy_removal_policy_2<RT2>`
  `CGAL::Segment_Delaunay_graph_degeneracy_removal_policy_2<SDG2>`
  `CGAL::Segment_Delaunay_graph_caching_degeneracy_removal_policy_2<SDG2>`

See also
  `DelaunayGraph_2`
  `AdaptationTraits_2`
  `CGAL::Voronoi_diagram_2<DG,AT,AP>`

## Types
typedef unspecified_type | Site_2
| A type for the sites of the Voronoi diagram.
typedef unspecified_type | Delaunay_graph
| A type for the triangulated Delaunay graph.
typedef Delaunay_graph::Vertex_handle | Delaunay_vertex_handle
typedef Delaunay_graph::Face_handle | Delaunay_face_handle
typedef Delaunay_graph::Edge | Delaunay_edge
typedef Delaunay_graph::All_edges_iterator | All_Delaunay_edges_iterator
typedef Delaunay_graph::Finite_edges_iterator | Finite_Delaunay_edges_iterator
typedef Delaunay_graph::Edge_circulator | Delaunay_edge_circulator
typedef unspecified_type | Edge_rejector
| A type for the predicate functor that is responsible for rejecting an edge of the Delaunay graph (or equivalently rejecting its dual edge in the Voronoi diagram).
typedef unspecified_type | Face_rejector
| A type for the predicate functor that is responsible for rejecting a vertex of the Delaunay graph (or equivalently its dual face in the Voronoi diagram - hence the name of the functor).
typedef unspecified_type | Has_inserter
| A tag for determining if the adaptation policy class provides a functor for inserting sites in the Delaunay graph.
typedef unspecified_type | Site_inserter
| A type for a functor that inserts sites in the Delaunay graph.

## Access to objects
Edge_rejector | edge_rejector_object ()
Face_rejector | face_rejector_object ()
Site_inserter | site_inserter_object ()
| This method is required only if `Has_inserter` is equal to `CGAL::Tag_true`.

## Miscellaneous
The following methods are important when the adaptation policy maintains a state. This can happen if we have a caching adaptation policy, i.e., when we cache the results of the edge and face rejectors.
void | clear ()
| Clears the state of the adaptation policy.
void | swap (AdaptationPolicy_2 other)
| The adaptation policies `ap` and `other` are swapped.
bool | is_valid ()
| Tests the validity of the adaptation policy.
bool | is_valid (Delaunay_graph dg)
| Tests the validity of the adaptation policy using extra information from the Delaunay graph `dg`.

## Member Typedef Documentation

## ◆ Delaunay_graph

typedef unspecified_type AdaptationPolicy_2::Delaunay_graph

A type for the triangulated Delaunay graph.

The type `Delaunay_graph` must be a model of the `DelaunayGraph_2` concept.

## ◆ Edge_rejector

typedef unspecified_type AdaptationPolicy_2::Edge_rejector

A type for the predicate functor that is responsible for rejecting an edge of the Delaunay graph (or equivalently rejecting its dual edge in the Voronoi diagram).

It must be model of the concepts `DefaultConstructible`, `CopyConstructible`, `Assignable`, and `AdaptableBinaryFunction`. It must provide the following operators:

`bool operator()(Delaunay_graph dg, Delaunay_edge e)`

`bool operator()(Delaunay_graph dg, Delaunay_face_handle f, int i)`

`bool operator()(Delaunay_graph dg, Delaunay_edge_circulator ec)`

`bool operator()(Delaunay_graph dg, All_Delaunay_edges_iterator eit)`

`bool operator()(Delaunay_graph dg, Finite_Delaunay_edges_iterator eit)`

The functor returns `true` iff the edge is rejected.

## ◆ Face_rejector

typedef unspecified_type AdaptationPolicy_2::Face_rejector

A type for the predicate functor that is responsible for rejecting a vertex of the Delaunay graph (or equivalently its dual face in the Voronoi diagram - hence the name of the functor).

It must be model of the concepts `DefaultConstructible`, `CopyConstructible`, `Assignable`, `AdaptableBinaryFunction`. It must provide the following operator:

`bool operator()(Delaunay graph dg, Delaunay_vertex_handle v)`

The functor returns `true` iff the face is rejected.

## ◆ Has_inserter

typedef unspecified_type AdaptationPolicy_2::Has_inserter

A tag for determining if the adaptation policy class provides a functor for inserting sites in the Delaunay graph.

This tag is equal to either `CGAL::Tag_true` (a site inserter functor is available) or `CGAL::Tag_false` (a site inserter functor is not available).

## ◆ Site_inserter

typedef unspecified_type AdaptationPolicy_2::Site_inserter

A type for a functor that inserts sites in the Delaunay graph.

It must be model of the concepts `DefaultConstructible`, `CopyConstructible`, `Assignable`, `AdaptableBinaryFunction` following operator

`Delaunay_vertex_handle operator()(Delaunay_graph& dg, Site_2 t)`

The vertex handle returned either points to the vertex of the Delaunay graph corresponding to the site just inserted or is the default constructed vertex handle. The latter case can happen if the site inserted is hidden, i.e., it has an empty Voronoi cell.

This type is required only if the `Has_inserter` tag is equal to `CGAL::Tag_true`.

## Member Function Documentation

## ◆ swap()

void AdaptationPolicy_2::swap | ( | AdaptationPolicy_2 | other | ) |

The adaptation policies `ap` and `other` are swapped.

This method should be preferred to `ap=other` or `ap(other)` if `other` is deleted afterwards.