CGAL 5.3 - CGAL and the Boost Graph Library

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 >
 The class HalfedgeDS_face_max_base_with_id is a model of the HalfedgeDSFace concept. More...
 
class  CGAL::HalfedgeDS_halfedge_max_base_with_id< Refs >
 The class HalfedgeDS_halfedge_max_base_with_id is a model of the HalfedgeDSHalfedge concept. More...
 
class  CGAL::HalfedgeDS_vertex_max_base_with_id< Refs >
 The class HalfedgeDS_vertex_max_base_with_id is a model of the HalfedgeDSVertex concept. More...
 
struct  CGAL::Linear_cell_complex_bgl_min_items
 The class Linear_cell_complex_bgl_min_items defines void as the information associated with darts, darts have ids and 0- and 2-attributes are enabled and have ids. More...
 
struct  CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper< d, d2, LCCTraits, Alloc >
 The class Linear_cell_complex_for_bgl_combinatorial_map_helper defines a CGAL::Linear_cell_complex_for_combinatorial_map as inner type, named type, having CGAL::Linear_cell_complex_bgl_min_items as items class. More...
 
class  CGAL::Polyhedron_items_with_id_3
 The class Polyhedron_items_with_id_3 is a model of the PolyhedronItems_3 concept. More...
 
class  CGAL::Triangulation_face_base_with_id_2< TriangulationTraits_2, TriangulationFaceBase_2 >
 The class Triangulation_face_base_with_id_2 is a model of the concept TriangulationFaceBase_2, the base face of a 2D-triangulation. More...
 
class  CGAL::Triangulation_vertex_base_with_id_2< TriangulationTraits_2, TriangulationVertexBase_2 >
 The class Triangulation_vertex_base_with_id_2 is a model of the concept TriangulationVertexBase_2, the base vertex of a 2D-triangulation. More...
 

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...
 

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 2D Triangulations package