\( \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.3 - CGAL and the Boost Graph Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
boost::graph_traits< CGAL::Triangulation_2< GT, TDS > > Class Template Reference

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

Definition

The class graph_traits is a partial specialization of boost::graph_traits for the 2D triangulation classes.

The triangulations of CGAL are all models of the concepts BidirectionalGraph and VertexAndEdgeListGraph of the Boost Graph Library [1].

The mapping between vertices and edges of the triangulation and the graph is rather straightforward, but there are some subtleties. The value type of the Bgl iterators is the vertex or edge descriptor, whereas in CGAL all iterators and circulators are also handles and hence have as value type Vertex or Edge.

The graph traits class for triangulations does not distinguish between finite and infinite vertices and edges. As the edge weight computed with the default property map of Bgl algorithms (obtained with boost::get(t, boost::edge_weight)) is the length of the edge, the edge weight is not well defined for infinite edges. For algorithms that make use of the edge weight the user must therefore define a boost::filtered_graph or pass a property map to the algorithm that returns "infinity" for infinite edges.

Note also that when you derive from the class CGAL::Triangulation_2 you must upcast the object in order to use this partial specialization.

For the user convenience, CGAL provides the partial specializations for all 2D triangulation classes.

Types

typedef
Triangulation::Vertex_handle 
vertex_descriptor
 The vertex descriptor.
 
typedef unspecified_type edge_descriptor
 The edge descriptor. More...
 
typedef unspecified_type vertex_iterator
 The vertex iterator type. More...
 
typedef unspecified_type edge_iterator
 The edge iterator type, Its value type is edge_descriptor.
 
typedef unspecified_type out_edge_iterator
 An iterator for the outgoing edges incident to a vertex. More...
 
typedef unspecified_type in_edge_iterator
 An iterator for the incoming edges incident to a vertex. More...
 
typedef unspecified_type adjacency_iterator
 An iterator for the vertices adjacent to a vertex. More...
 
typedef boost::undirected_tag directed_category
 
typedef
boost::disallow_parallel_edge_tag 
edge_parallel_category
 

Member Typedef Documentation

template<typename GT , typename TDS >
typedef unspecified_type boost::graph_traits< CGAL::Triangulation_2< GT, TDS > >::adjacency_iterator

An iterator for the vertices adjacent to a vertex.

Its value type is vertex_descriptor.

template<typename GT , typename TDS >
typedef unspecified_type boost::graph_traits< CGAL::Triangulation_2< GT, TDS > >::edge_descriptor

The edge descriptor.

It is constructible from and convertible to Triangulation::Edge. The edge descriptor is not a simple typedef, but a proper class, because in an undirected graph the edges (u,v) and (v,u) must be equal. This is not the case for the Edge type of the triangulation.

template<typename GT , typename TDS >
typedef unspecified_type boost::graph_traits< CGAL::Triangulation_2< GT, TDS > >::in_edge_iterator

An iterator for the incoming edges incident to a vertex.

Its value type is edge_descriptor.

template<typename GT , typename TDS >
typedef unspecified_type boost::graph_traits< CGAL::Triangulation_2< GT, TDS > >::out_edge_iterator

An iterator for the outgoing edges incident to a vertex.

Its value type is edge_descriptor.

template<typename GT , typename TDS >
typedef unspecified_type boost::graph_traits< CGAL::Triangulation_2< GT, TDS > >::vertex_iterator

The vertex iterator type.

Its value type is vertex_descriptor.