CGAL 5.1 - CGAL and the Boost Graph Library
BGLGraphExternalIndices

A number of BGL and CGAL algorithms require the graph to have (initialized) integer-like 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.

Classes

class  CGAL::HalfedgeDS_face_max_base_with_id< Refs >
 
class  CGAL::HalfedgeDS_halfedge_max_base_with_id< Refs >
 
class  CGAL::HalfedgeDS_vertex_max_base_with_id< Refs >
 
struct  CGAL::Linear_cell_complex_bgl_min_items
 
struct  CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper< d, d2, LCCTraits, Alloc >
 
class  CGAL::Polyhedron_items_with_id_3
 
class  CGAL::Triangulation_face_base_with_id_2< TriangulationTraits_2, TriangulationFaceBase_2 >
 
class  CGAL::Triangulation_vertex_base_with_id_2< TriangulationTraits_2, TriangulationVertexBase_2 >
 

Functions

template<class HalfedgeDS_with_id >
void CGAL::set_halfedgeds_items_id (Polyhedron_with_id &P)
 
template<typename Triangulation >
void CGAL::set_triangulation_ids (Triangulation &tr)
 

Function Documentation

◆ set_halfedgeds_items_id()

template<class HalfedgeDS_with_id >
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.

◆ set_triangulation_ids()

template<typename Triangulation >
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.

Template Parameters
Triangulationa 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.
See also
the PkgTriangulation2 package