CGAL 5.6.1  CGAL and the Boost Graph Library

A number of BGL and CGAL algorithms require the graph to have (initialized) integerlike indices for its vertices, edges, or faces.
However, not all graphs intrinsically offer a natural way to attach a unique ID to each element. The following classes and functions paliate this by attaching and initializing external IDs to the elements of the graph.
Functions  
template<class HalfedgeDS_with_id >  
void  CGAL::set_halfedgeds_items_id (Polyhedron_with_id &P) 
Given a CGAL::Polyhedron_3 , for each simplex type (vertex, halfedge, facet) associates an index from 0 to the number of simplices minus 1 to each simplex of hds . More...  
template<typename Triangulation >  
void  CGAL::set_triangulation_ids (Triangulation &tr) 
This function initializes vertex, edge, and face indices of the triangulation tr and must be called prior to using tr as a BGL graph in an algorithm that requires vertex, halfedge, edge, or face indices. More...  
void CGAL::set_halfedgeds_items_id  (  Polyhedron_with_id &  P  ) 
#include <CGAL/Polyhedron_items_with_id_3.h>
Given a CGAL::Polyhedron_3
, for each simplex type (vertex, halfedge, facet) associates an index from 0 to the number of simplices minus 1 to each simplex of hds
.
All simplex types must provide an id()
method return a reference to a variable that can be assigned a std::size_t
. An item class suited for this use is CGAL::Polyhedron_items_with_id_3
.
void CGAL::set_triangulation_ids  (  Triangulation &  tr  ) 
#include <CGAL/Triangulation_face_base_with_id_2.h>
This function initializes vertex, edge, and face indices of the triangulation tr
and must be called prior to using tr
as a BGL graph in an algorithm that requires vertex, halfedge, edge, or face indices.
Triangulation  a 2D triangulation of CGAL, whose combinatorial data structure has been initialized with the vertex and face classes Triangulation_vertex_base_with_id_2 and Triangulation_face_base_with_id_2 . 