mirror of https://github.com/CGAL/cgal
Merge branch 'BGL-fix_doc-sloriot'
Clean-up and fix the documentation of the specialization of boost::graph_traits Approved by the release manager Tested in CGAL-4.4-Ic-48
This commit is contained in:
commit
3af2add868
|
|
@ -6,3 +6,4 @@ Circulator
|
||||||
Stream_support
|
Stream_support
|
||||||
Box_intersection_d
|
Box_intersection_d
|
||||||
Polyhedron
|
Polyhedron
|
||||||
|
BGL
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ namespace CGAL {
|
||||||
* \sa `AABBPrimitive`
|
* \sa `AABBPrimitive`
|
||||||
* \sa `AABB_primitive<Id,ObjectPropertyMap,PointPropertyMapPolyhedron,ExternalPropertyMaps,CacheDatum>`
|
* \sa `AABB_primitive<Id,ObjectPropertyMap,PointPropertyMapPolyhedron,ExternalPropertyMaps,CacheDatum>`
|
||||||
* \sa `AABB_face_graph_triangle_primitive<FaceGraph,OneFaceGraphPerTree,CacheDatum>`
|
* \sa `AABB_face_graph_triangle_primitive<FaceGraph,OneFaceGraphPerTree,CacheDatum>`
|
||||||
|
* \sa \link BGLPolyGT `boost::graph_traits<Polyhedron>` \endlink
|
||||||
*/
|
*/
|
||||||
template < class HalfedgeGraph,
|
template < class HalfedgeGraph,
|
||||||
class VertexPointPMap = typename boost::property_map< HalfedgeGraph, vertex_point_t>::type,
|
class VertexPointPMap = typename boost::property_map< HalfedgeGraph, vertex_point_t>::type,
|
||||||
|
|
|
||||||
|
|
@ -3594,7 +3594,7 @@ faces.
|
||||||
\subsection arr_ssecbgl_primal The Primal Arrangement Representation
|
\subsection arr_ssecbgl_primal The Primal Arrangement Representation
|
||||||
|
|
||||||
Arrangement instances are adapted to <span class="textsc">Boost</span> graphs by specializing the
|
Arrangement instances are adapted to <span class="textsc">Boost</span> graphs by specializing the
|
||||||
`boost:graph_traits` template for `Arrangement_2` instances. The
|
\link BGLArgtGT `boost:graph_traits` \endlink template for `Arrangement_2` instances. The
|
||||||
graph-traits states the graph concepts that the arrangement class models
|
graph-traits states the graph concepts that the arrangement class models
|
||||||
(see below) and defines the types required by these concepts.
|
(see below) and defines the types required by these concepts.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,4 @@ Boolean_set_operations_2
|
||||||
Number_types
|
Number_types
|
||||||
Circular_kernel_2
|
Circular_kernel_2
|
||||||
Algebraic_kernel_d
|
Algebraic_kernel_d
|
||||||
|
BGL
|
||||||
|
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
||||||
namespace boost {
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgBGLTraits
|
|
||||||
|
|
||||||
The class `graph_traits` is a partial specialization of
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/graph_traits.html">`boost::graph_traits`</A>
|
|
||||||
for the class `CGAL::Arrangement_2`. It provides the types associated
|
|
||||||
to the
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/graph_concepts.html">graph</A> concepts
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/BidirectionalGraph.html">`BidirectionalGraph`</A> and
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/EdgeAndVertexListGraph.html">`EdgeAndVertexListGraph`</A>.
|
|
||||||
|
|
||||||
The const specialization, `boost::graph_traits< CGAL::Arrangement_2<Traits,Dcel> const>`
|
|
||||||
is also defined, using the constant handles in the arrangement.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename T, typename DC> >
|
|
||||||
class graph_traits< CGAL::Arrangement_2<T, DC> > {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The vertex descriptor.
|
|
||||||
*/
|
|
||||||
typename CGAL::Arrangement_2::Vertex_handle vertex_descriptor;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The edge descriptor.
|
|
||||||
*/
|
|
||||||
typename CGAL::Arrangement_2::Halfedge_handle edge_descriptor;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator corresponding to
|
|
||||||
`CGAL::Arrangement_2::Vertex_iterator`,
|
|
||||||
with the difference that its value type is a vertex descriptor and not
|
|
||||||
`CGAL::Arrangement_2::Vertex`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type vertex_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator corresponding to
|
|
||||||
`CGAL::Arrangement_2::Halfedge_iterator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Arrangement_2::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An edge iterator which only iterates over
|
|
||||||
the incoming edges around a vertex. It corresponds to a
|
|
||||||
`CGAL::Arrangement_2::Halfedge_around_vertex_circulator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Arrangement_2::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type in_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An edge iterator which only iterates over
|
|
||||||
the outgoing halfedges around a vertex. It corresponds to a
|
|
||||||
`CGAL::Arrangement_2::Halfedge_around_vertex_circulator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Arrangement_2::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type out_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Indicates that this graph does support multiedges.
|
|
||||||
*/
|
|
||||||
boost::disallow_parallel_edge_tag edge_parallel_category;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Indicates that this graph is bidirectional.
|
|
||||||
*/
|
|
||||||
boost::bidirectional_graph_tag traversal_category;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the vertex list.
|
|
||||||
*/
|
|
||||||
typename Arrangement_2::size_type vertices_size_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the edge list.
|
|
||||||
*/
|
|
||||||
typename Arrangement_2::size_type edges_size_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the adjacency list.
|
|
||||||
*/
|
|
||||||
typename Arrangement_2::size_type degree_size_type;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end graph_traits */
|
|
||||||
} /* end namespace boost */
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
||||||
namespace boost {
|
|
||||||
/*!
|
|
||||||
\ingroup PkgBGLTraits
|
|
||||||
|
|
||||||
The class `graph_traits` is a partial specialization of
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/graph_traits.html">`boost::graph_traits`</A>
|
|
||||||
for the class `CGAL::Polyhedron_3`. It provides the types associated
|
|
||||||
to the
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/graph_concepts.html">graph</A> concepts
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/BidirectionalGraph.html">`BidirectionalGraph`</A> and
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/EdgeAndVertexListGraph.html">`EdgeAndVertexListGraph`</A>.
|
|
||||||
|
|
||||||
The const specialization, `boost::graph_traits< CGAL::Polyhedron_3<Traits> const>`
|
|
||||||
is also defined, using the constant handles in the polyhedron.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename T> >
|
|
||||||
class graph_traits< CGAL::Polyhedron_3<T> > {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The vertex descriptor.
|
|
||||||
*/
|
|
||||||
typename CGAL::Polyhedron_3::Vertex_handle vertex_descriptor;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The edge descriptor.
|
|
||||||
*/
|
|
||||||
typename CGAL::Polyhedron_3::Halfedge_handle edge_descriptor;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator corresponding to
|
|
||||||
`CGAL::Polyhedron_3::Vertex_iterator`,
|
|
||||||
with the difference that its value type is a vertex descriptor and not
|
|
||||||
`CGAL::Polyhedron_3::Vertex`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type vertex_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator corresponding to
|
|
||||||
`CGAL::Polyhedron_3::Halfedge_iterator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Polyhedron_3::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An edge iterator which only iterates over
|
|
||||||
the incoming edges around a vertex. It corresponds to a
|
|
||||||
`CGAL::Polyhedron_3::Halfedge_around_vertex_circulator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Polyhedron_3::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type in_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An edge iterator which only iterates over
|
|
||||||
the outgoing halfedges around a vertex. It corresponds to a
|
|
||||||
`CGAL::Polyhedron_3::Halfedge_around_vertex_circulator`
|
|
||||||
with the difference that its value type is an edge descriptor and not
|
|
||||||
`CGAL::Polyhedron_3::Halfedge`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type out_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Indicates that this graph does not support multiedges.
|
|
||||||
*/
|
|
||||||
boost::disallow_parallel_edge_tag edge_parallel_category;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Indicates that this graph is bidirectional.
|
|
||||||
*/
|
|
||||||
boost::bidirectional_graph_tag traversal_category;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the vertex list.
|
|
||||||
*/
|
|
||||||
typename Polyhedron_3::size_type vertices_size_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the edge list.
|
|
||||||
*/
|
|
||||||
typename Polyhedron_3::size_type edges_size_type;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The size type of the adjacency list.
|
|
||||||
*/
|
|
||||||
typename Polyhedron_3::size_type degree_size_type;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end graph_traits */
|
|
||||||
} /* end namespace boost */
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
namespace boost {
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\ingroup PkgBGLTraits
|
|
||||||
|
|
||||||
The class `graph_traits` is a partial specialization of
|
|
||||||
<A HREF="http://www.boost.org/libs/graph/doc/graph_traits.html">`boost::graph_traits`</A>
|
|
||||||
for the 2D triangulation classes.
|
|
||||||
|
|
||||||
The triangulations of \cgal are all models of the concepts
|
|
||||||
`BidirectionalGraph` and `VertexAndEdgeListGraph` of the Boost Graph
|
|
||||||
Library \cgalCite{cgal:sll-bgl-02}.
|
|
||||||
|
|
||||||
|
|
||||||
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 \sc{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 \sc{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 <A HREF="http://www.boost.org/libs/graph/doc/filtered_graph.html">`boost::filtered_graph`</A> 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.
|
|
||||||
|
|
||||||
*/
|
|
||||||
template< typename GT, typename TDS> >
|
|
||||||
class graph_traits< CGAL::Triangulation_2<GT, TDS> > {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The vertex descriptor.
|
|
||||||
*/
|
|
||||||
typedef Triangulation::Vertex_handle vertex_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.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type edge_descriptor;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The vertex iterator type. Its value type is `vertex_descriptor`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type vertex_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
The edge iterator type, Its value type is `edge_descriptor`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator for the outgoing edges incident to a vertex.
|
|
||||||
Its value type is `edge_descriptor`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type out_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator for the incoming edges incident to a vertex.
|
|
||||||
Its value type is `edge_descriptor`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type in_edge_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
An iterator for the vertices adjacent to a vertex.
|
|
||||||
Its value type is `vertex_descriptor`.
|
|
||||||
*/
|
|
||||||
typedef unspecified_type adjacency_iterator;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef boost::undirected_tag directed_category;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
|
|
||||||
*/
|
|
||||||
typedef boost::disallow_parallel_edge_tag edge_parallel_category;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end graph_traits */
|
|
||||||
} /* end namespace boost */
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLTraits
|
\ingroup PkgBGL
|
||||||
|
|
||||||
The class `halfedge_graph_traits` is a traits class for `HalfedgeGraph`.
|
The class `halfedge_graph_traits` is a traits class for `HalfedgeGraph`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,6 @@
|
||||||
/// \defgroup PkgBGLEnums Enums
|
/// \defgroup PkgBGLEnums Enums
|
||||||
/// \ingroup PkgBGL
|
/// \ingroup PkgBGL
|
||||||
|
|
||||||
|
|
||||||
/// \defgroup PkgBGLTraits Traits Classes
|
|
||||||
/// \ingroup PkgBGL
|
|
||||||
|
|
||||||
|
|
||||||
/// \defgroup PkgBGLHelper Helper Classes
|
/// \defgroup PkgBGLHelper Helper Classes
|
||||||
/// \ingroup PkgBGL
|
/// \ingroup PkgBGL
|
||||||
|
|
||||||
|
|
@ -43,10 +38,10 @@
|
||||||
- `CGAL::vertex_point_t`
|
- `CGAL::vertex_point_t`
|
||||||
|
|
||||||
## Classes ##
|
## Classes ##
|
||||||
- `boost::graph_traits< CGAL::Arrangement_2<T,DC> >`
|
- \link BGLArgtGT `boost::graph_traits< CGAL::Arrangement_2<T,DC> >` \endlink
|
||||||
- `boost::graph_traits< CGAL::Polyhedron_3<T> >`
|
- \link BGLPolyGT `boost::graph_traits< CGAL::Polyhedron_3<T> >` \endlink
|
||||||
|
- \link BGLT2GT `boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >` \endlink
|
||||||
- `CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >`
|
- `CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >`
|
||||||
- `boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >`
|
|
||||||
- `CGAL::Triangulation_vertex_base_with_id_2<TriangulationTraits_2, TriangulationVertexBase_2>`
|
- `CGAL::Triangulation_vertex_base_with_id_2<TriangulationTraits_2, TriangulationVertexBase_2>`
|
||||||
- `CGAL::HalfedgeDS_vertex_max_base_with_id<Refs>`
|
- `CGAL::HalfedgeDS_vertex_max_base_with_id<Refs>`
|
||||||
- `CGAL::HalfedgeDS_halfedge_max_base_with_id<Refs>`
|
- `CGAL::HalfedgeDS_halfedge_max_base_with_id<Refs>`
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*!
|
||||||
|
\defgroup PkgBGLTraits Specializations of boost::graph_traits
|
||||||
|
Specializations of `boost::graph_traits` for \cgal types.
|
||||||
|
\ingroup PkgBGL
|
||||||
|
|
||||||
|
The boost %graph library (BGL) uses the type trait class
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/graph_traits.html">`boost::graph_traits`</A>
|
||||||
|
to provides a uniform interface to the properties and types of %graph types.
|
||||||
|
|
||||||
|
\section BGLPolyGT Specialization for the Polyhedron Class
|
||||||
|
|
||||||
|
Defined in `<CGAL/boost/graph/graph_traits_Polyhedron_3.h>`
|
||||||
|
|
||||||
|
Partial specialization for the class `CGAL::Polyhedron_3`. It provides the types associated
|
||||||
|
to the
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/graph_concepts.html">graph</A> concepts
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/BidirectionalGraph.html">`BidirectionalGraph`</A> and
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/EdgeAndVertexListGraph.html">`EdgeAndVertexListGraph`</A>.
|
||||||
|
|
||||||
|
The const specialization, `boost::graph_traits< CGAL::Polyhedron_3<Traits> const>`
|
||||||
|
is also defined, using the constant handles in the polyhedron.
|
||||||
|
|
||||||
|
The traits class `boost::graph_traits< CGAL::Polyhedron_3<T> >` provides the following types:
|
||||||
|
|
||||||
|
| Member | Value | Description |
|
||||||
|
| :----------------------- | :----: | :---------- |
|
||||||
|
| `vertex_descriptor` | `Polyhedron_3::Vertex_handle` | The vertex descriptor |
|
||||||
|
| `edge_descriptor` | `Polyhedron_3::Halfedge_handle` | The edge descriptor |
|
||||||
|
| `adjacency_iterator` | Not provided | |
|
||||||
|
| `out_edge_iterator` | `unspecified_type` | An edge iterator which only iterates over the outgoing halfedges around a vertex. It corresponds to a `Polyhedron_3::Halfedge_around_vertex_circulator` with the difference that its value type is an edge descriptor and not `Polyhedron_3::Halfedge` |
|
||||||
|
| `in_edge_iterator` | `unspecified_type` | An edge iterator which only iterates over the incoming edges around a vertex. It corresponds to a `Polyhedron_3::Halfedge_around_vertex_circulator` with the difference that its value type is an edge descriptor and not `Polyhedron_3::Halfedge` |
|
||||||
|
| `vertex_iterator` | `unspecified_type` | An iterator corresponding to `Polyhedron_3::Vertex_iterator`, with the difference that its value type is a vertex descriptor and not `Polyhedron_3::Vertex` |
|
||||||
|
| `edge_iterator` | `Polyhedron_3::Halfedge_iterator` | An iterator corresponding to `Polyhedron_3::Halfedge_iterator` with the difference that its value type is an edge descriptor and not `Polyhedron_3::Halfedge` |
|
||||||
|
| `directed_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag` and `boost::edge_list_graph_tag` | |
|
||||||
|
| `edge_parallel_category` | boost::disallow_parallel_edge_tag | Indicates that this graph does not support multiedges |
|
||||||
|
| `traversal_category` | boost::bidirectional_graph_tag | Indicates that this graph is bidirectional |
|
||||||
|
| `vertices_size_type` | Polyhedron_3::size_type | The size type of the vertex list |
|
||||||
|
| `edges_size_type` | Polyhedron_3::size_type | The size type of the edge list |
|
||||||
|
| `degree_size_type` | Polyhedron_3::size_type | The size type of the adjacency list |
|
||||||
|
|
||||||
|
|
||||||
|
\section BGLT2GT Specializations for the 2D Triangulation Classes
|
||||||
|
|
||||||
|
Defined in `<CGAL/boost/graph/graph_traits_Triangulation_2.h>` and `<CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h>`
|
||||||
|
|
||||||
|
The triangulations of \cgal are all models of the concepts
|
||||||
|
`BidirectionalGraph` and `VertexAndEdgeListGraph` of the Boost Graph
|
||||||
|
Library \cgalCite{cgal:sll-bgl-02}.
|
||||||
|
|
||||||
|
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 \sc{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 \sc{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 <A HREF="http://www.boost.org/libs/graph/doc/filtered_graph.html">`boost::filtered_graph`</A> 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.
|
||||||
|
|
||||||
|
The traits class `boost::graph_traits< CGAL::Triangulation_2<GT, TDS> >` and
|
||||||
|
`boost::graph_traits< CGAL::Delaunay_triangulation_2<GT, TDS> >`
|
||||||
|
provide the following types:
|
||||||
|
|
||||||
|
| Member | Value | Description |
|
||||||
|
| :----------------------- | :----: | :---------- |
|
||||||
|
| `vertex_descriptor` | `Triangulation::Vertex_handle` | The vertex descriptor |
|
||||||
|
| `edge_descriptor` | `unspecified_type` | 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. |
|
||||||
|
| `adjacency_iterator` | `unspecified_type` | An iterator for the vertices adjacent to a vertex. Its value type is `vertex_descriptor` |
|
||||||
|
| `out_edge_iterator` | `unspecified_type` | An iterator for the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. |
|
||||||
|
| `in_edge_iterator` | `unspecified_type` | An iterator for the incoming edges incident to a vertex. Its value type is `edge_descriptor`. |
|
||||||
|
| `vertex_iterator` | `unspecified_type` | The vertex iterator type. Its value type is `vertex_descriptor` |
|
||||||
|
| `edge_iterator` | `unspecified_type` | The edge iterator type, Its value type is `edge_descriptor` |
|
||||||
|
| `directed_category` | `boost::undirected_tag` | |
|
||||||
|
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | Indicates that this graph does not support multiedges |
|
||||||
|
| `traversal_category` | `boost::bidirectional_graph_tag` | Indicates that this graph is bidirectional |
|
||||||
|
| `vertices_size_type` | `Triangulation::size_type` | The size type of the vertex list |
|
||||||
|
| `edges_size_type` | `Triangulation::size_type` | The size type of the edge list |
|
||||||
|
| `degree_size_type` | `Triangulation::size_type` | The size type of the adjacency list |
|
||||||
|
|
||||||
|
\section BGLArgtGT Specialization for the Arrangement Classes
|
||||||
|
|
||||||
|
Defined in `<CGAL/boost/graph/graph_traits_Arrangement_2.h>`
|
||||||
|
|
||||||
|
|
||||||
|
The class `Arrangement_2` is a model of to the
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/graph_concepts.html">graph</A> concepts
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/BidirectionalGraph.html">`BidirectionalGraph`</A> and
|
||||||
|
<A HREF="http://www.boost.org/libs/graph/doc/EdgeAndVertexListGraph.html">`EdgeAndVertexListGraph`</A>.
|
||||||
|
|
||||||
|
The const specialization, `boost::graph_traits< CGAL::Arrangement_2<Traits,Dcel> const>`
|
||||||
|
is also defined, using the constant handles in the arrangement.
|
||||||
|
|
||||||
|
The traits class `boost::graph_traits< CGAL::Arrangement_2<T, DC> >`
|
||||||
|
provides the following types:
|
||||||
|
|
||||||
|
| Member | Value | Description |
|
||||||
|
| :----------------------- | :----: | :---------- |
|
||||||
|
| `vertex_descriptor` | `Arrangement_2::Vertex_handle` | The vertex descriptor |
|
||||||
|
| `edge_descriptor` | `Arrangement_2::Halfedge_handle` | The edge descriptor |
|
||||||
|
| `adjacency_iterator` | Not provided| |
|
||||||
|
| `out_edge_iterator` | `unspecified_type` | An edge iterator which only iterates over the outgoing halfedges around a vertex. It corresponds to a `Arrangement_2::Halfedge_around_vertex_circulator` with the difference that its value type is an edge descriptor and not `Arrangement_2::Halfedge`|
|
||||||
|
| `in_edge_iterator` | `unspecified_type` | An edge iterator which only iterates over the incoming edges around a vertex. It corresponds to a `Arrangement_2::Halfedge_around_vertex_circulator` with the difference that its value type is an edge descriptor and not `Arrangement_2::Halfedge`|
|
||||||
|
| `vertex_iterator` | `unspecified_type` | An iterator corresponding to `Arrangement_2::Vertex_iterator`, with the difference that its value type is a vertex descriptor and not `Arrangement_2::Vertex` |
|
||||||
|
| `edge_iterator` | `unspecified_type` | An iterator corresponding to `Arrangement_2::Halfedge_iterator` with the difference that its value type is an edge descriptor and not `Arrangement_2::Halfedge`|
|
||||||
|
| `directed_category` | `boost::directed_tag` | |
|
||||||
|
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | Indicates that this graph does support multiedges |
|
||||||
|
| `traversal_category` | `boost::bidirectional_graph_tag` | Indicates that this graph is bidirectional |
|
||||||
|
| `vertices_size_type` | `Arrangement_2::size_type` | The size type of the vertex list |
|
||||||
|
| `edges_size_type` | `Arrangement_2::size_type` | The size type of the edge list |
|
||||||
|
| `degree_size_type` | `Arrangement_2::size_type` | The size type of the adjacency list |
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org).
|
||||||
|
// You can redistribute it and/or modify it under the terms of the GNU
|
||||||
|
// General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
||||||
|
// Efi Fogel <efif@post.tau.ac.il>
|
||||||
|
|
||||||
|
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/graph_traits_Arrangement_2.h>
|
||||||
|
|
||||||
|
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org).
|
||||||
|
// You can redistribute it and/or modify it under the terms of the GNU
|
||||||
|
// General Public License as published by the Free Software Foundation,
|
||||||
|
// either version 3 of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Licensees holding a valid commercial license may use this file in
|
||||||
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
//
|
||||||
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
||||||
|
// Efi Fogel <efif@post.tau.ac.il>
|
||||||
|
|
||||||
|
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
||||||
|
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/graph_traits_Dual_Arrangement_2.h>
|
||||||
|
|
||||||
|
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
||||||
|
|
@ -77,7 +77,7 @@ remains.
|
||||||
<I>External Adaptation</I>, which is described in \cgalCite{cgal:sll-bgl-02}
|
<I>External Adaptation</I>, which is described in \cgalCite{cgal:sll-bgl-02}
|
||||||
and this <span class="textsc">Bgl</span> web page: <A HREF="http://www.boost.org/libs/graph/doc/leda_conversion.html"><TT>http://www.boost.org/libs/graph/doc/leda_conversion.html</TT></A>).
|
and this <span class="textsc">Bgl</span> web page: <A HREF="http://www.boost.org/libs/graph/doc/leda_conversion.html"><TT>http://www.boost.org/libs/graph/doc/leda_conversion.html</TT></A>).
|
||||||
|
|
||||||
\sa `boost::graph_traits< CGAL::Polyhedron_3<Traits> >`
|
\sa \link BGLPolyGT `boost::graph_traits< CGAL::Polyhedron_3<Traits> >` \endlink
|
||||||
\sa `CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >`
|
\sa `CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >`
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue