Class

boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >

Definition

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

The class graph_traits< CGAL::Triangulation_2<GT, TDS> > is a partial specialization of the class boost::graph_traits<G>.

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.

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

Types

typedef Triangulation::Vertex_handle
vertex_descriptor; The vertex descriptor.

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.


graph_traits< CGAL::Triangulation_2<GT, TDS> >::vertex_iterator
The vertex iterator type. Its value type is vertex_descriptor.


graph_traits< CGAL::Triangulation_2<GT, TDS> >::edge_iterator
The edge iterator type, Its value type is edge_descriptor.


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.


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.


graph_traits< CGAL::Triangulation_2<GT, TDS> >::adjacency_iterator
An iterator for the vertices adjacent to a vertex. Its value type is vertex_descriptor.

typedef boost::undirected_tag directed_category;

typedef boost::disallow_parallel_edge_tag
edge_parallel_category;