CGAL 5.6 - CGAL and the Boost Graph Library
Loading...
Searching...
No Matches
CGAL::Dual< Primal_ > Class Template Reference

#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 Primalprimal () const
 returns the underlying primal.
 

Related Functions

(Note that these are not member functions.)

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