CGAL 5.6.3 - CGAL and the Boost Graph Library

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions | Related Functions
CGAL::Dual< Primal_ > Class Template Reference
CGAL and the Boost Graph Library Reference » Graph Adaptors

`#include <CGAL/boost/graph/Dual.h>`

## Definition

template<typename Primal_>
class CGAL::Dual< Primal_ >

The class template `Dual` is an adaptor that creates the dual view of a `FaceGraph`.

Faces of the original graph correspond to vertices in the `Dual` and vice versa.

Note that border edges in a `Dual` have the `null_face` of the original graph as either source or target. This is unusual and might break other algorithms since edges are always assumed to have non-null vertices as a source and target. It is possible to filter border edges using `boost::filtered_graph` as shown in example BGL_surface_mesh/surface_mesh_dual.cpp

Property Forwarding

Advanced

Edge properties of the underlying graph are forwarded directly. For faces and vertices only the `face_index` and `vertex_index` properties are forwarded. Accessing other properties will lead to a compilation error.

Template Parameters

  Primal_ | must be a model of `FaceGraph`

Is Model Of:
  `FaceGraph`

Examples
  BGL_arrangement_2/arrangement_dual.cpp, and BGL_surface_mesh/surface_mesh_dual.cpp.

## Public Types
typedef Primal_ | Primal
| The underlying primal type.

## Public Member Functions
| Dual (const Primal &primal)
| constructs a Dual from a given primal.
const Primal & | primal () const
| returns the underlying primal.

## Related Functions
(Note that these are not member functions.)
template<typename Primal >
Dual< Primal > | dual (const Primal &primal)
| constructs a `Dual` from a given `primal`.