\( \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.12.2 - CGAL and the Boost Graph Library
CGAL::Dual< Primal_ > Class Template Reference

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

Definition

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. More...
 

Public Member Functions

 Dual (const Primal &primal)
 Construct a Dual from a given primal. More...
 
const Primalprimal () const
 Returns the underlying primal. More...
 

Related Functions

(Note that these are not member functions.)

template<typename Primal >
Dual< Primaldual (const Primal &primal)
 Construct a Dual from a given primal.
 

Member Typedef Documentation

◆ Primal

template<typename Primal_ >
typedef Primal_ CGAL::Dual< Primal_ >::Primal

The underlying primal type.

Constructor & Destructor Documentation

◆ Dual()

template<typename Primal_ >
CGAL::Dual< Primal_ >::Dual ( const Primal primal)

Construct a Dual from a given primal.

Member Function Documentation

◆ primal()

template<typename Primal_ >
const Primal& CGAL::Dual< Primal_ >::primal ( ) const

Returns the underlying primal.