Arrangement and update documentation

This commit is contained in:
Andreas Fabri 2022-05-03 15:31:09 +01:00
parent fd20beeef7
commit 380704bf67
2 changed files with 39 additions and 23 deletions

View File

@ -27,6 +27,7 @@
#include <CGAL/Named_function_parameters.h> #include <CGAL/Named_function_parameters.h>
#include <boost/graph/graph_concepts.hpp> #include <boost/graph/graph_concepts.hpp>
#include <CGAL/boost/graph/iterator.h>
#include <CGAL/boost/iterator/counting_iterator.hpp> #include <CGAL/boost/iterator/counting_iterator.hpp>
#include <CGAL/Arrangement_on_surface_2.h> #include <CGAL/Arrangement_on_surface_2.h>
#include <CGAL/Arrangement_2.h> #include <CGAL/Arrangement_2.h>
@ -75,7 +76,8 @@ private:
public virtual boost::bidirectional_graph_tag, // This tag refines the public virtual boost::bidirectional_graph_tag, // This tag refines the
// incidence_graph_tag. // incidence_graph_tag.
public virtual boost::vertex_list_graph_tag, // Can iterate over vertices. public virtual boost::vertex_list_graph_tag, // Can iterate over vertices.
public virtual boost::edge_list_graph_tag // Can iterate over edges. public virtual boost::edge_list_graph_tag, // Can iterate over edges.
public virtual boost::adjacency_graph_tag
{}; {};
/*! \class /*! \class
@ -232,7 +234,7 @@ public:
typedef typename Arrangement_on_surface_2::Size edges_size_type; typedef typename Arrangement_on_surface_2::Size edges_size_type;
// Types not required by any of these concepts: // Types not required by any of these concepts:
typedef void adjacency_iterator; typedef CGAL::Vertex_around_target_iterator<Arrangement_on_surface_2> adjacency_iterator;
/*! Constructor. */ /*! Constructor. */
graph_traits (const Arrangement_on_surface_2& arr) : graph_traits (const Arrangement_on_surface_2& arr) :
@ -411,6 +413,20 @@ out_edges (typename
return std::make_pair (gt_arr.out_edges_begin (v), gt_arr.out_edges_end (v)); return std::make_pair (gt_arr.out_edges_begin (v), gt_arr.out_edges_end (v));
} }
template <class GeomTraits, class TopTraits>
Iterator_range< typename
boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
TopTraits> >::
adjacency_iterator>
adjacent_vertices(typename
boost::graph_traits<CGAL::Arrangement_on_surface_2<GeomTraits,
TopTraits> >::
vertex_descriptor v,
const CGAL::Arrangement_on_surface_2<GeomTraits, TopTraits>& arr)
{
return CGAL::vertices_around_target(v,arr);
}
/*! /*!
* Get the source vertex of an arrangement edge. * Get the source vertex of an arrangement edge.
* \param e The edge. * \param e The edge.

View File

@ -36,7 +36,7 @@ The traits class `boost::graph_traits< CGAL::Surface_mesh<T> >` provides the fol
| `face_iterator` | `Surface_mesh::Face_iterator` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. | | `face_iterator` | `Surface_mesh::Face_iterator` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. |
| `directed_category` | `boost::undirected_tag` | This graph is not directed. | | `directed_category` | `boost::undirected_tag` | This graph is not directed. |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. | | `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, and `boost::edge_list_graph_tag` | The ways in which the vertices in the graph can be traversed. | | `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, `boost::edge_list_graph_tag`, and `boost::adjacency_graph_tag` | The ways in which the vertices in the graph can be traversed. |
| `vertices_size_type` | `Surface_mesh::vertices_size_type` | The size type of the vertex list. | | `vertices_size_type` | `Surface_mesh::vertices_size_type` | The size type of the vertex list. |
| `edges_size_type` | `Surface_mesh::edges_size_type` | The size type of the edge list. | | `edges_size_type` | `Surface_mesh::edges_size_type` | The size type of the edge list. |
| `degree_size_type` | `Surface_mesh::degree_size_type` | The size type of the adjacency list. | | `degree_size_type` | `Surface_mesh::degree_size_type` | The size type of the adjacency list. |
@ -69,7 +69,7 @@ The traits class `boost::graph_traits< CGAL::Polyhedron_3<T> >` provides the fol
| `face_iterator` | `unspecified_type` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. | | `face_iterator` | `unspecified_type` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. |
| `directed_category` | `boost::undirected_tag` | This graph is not directed. | | `directed_category` | `boost::undirected_tag` | This graph is not directed. |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. | | `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, and `boost::edge_list_graph_tag` | The ways in which the vertices in the graph can be traversed. | | `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, `boost::edge_list_graph_tag`, and`boost::adjacency_graph_tag` | The ways in which the vertices in the graph can be traversed. |
| `vertices_size_type` | `Polyhedron_3::size_type` | The size type of the vertex list. | | `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. | | `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. | | `degree_size_type` | `Polyhedron_3::size_type` | The size type of the adjacency list. |
@ -102,7 +102,7 @@ The traits class `boost::graph_traits<LCC>` provides the following types:
| `edge_iterator` | `unspecified_type` | Iterate through the edges of LCC.| | `edge_iterator` | `unspecified_type` | Iterate through the edges of LCC.|
| `halfedge_iterator` | `unspecified_type` | Iterate through the halfedges of LCC.| | `halfedge_iterator` | `unspecified_type` | Iterate through the halfedges of LCC.|
| `face_iterator` | `unspecified_type` | Iterate through the faces of LCC.| | `face_iterator` | `unspecified_type` | Iterate through the faces of LCC.|
| `directed_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag` and `boost::edge_list_graph_tag` | | | `directed_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, `boost::edge_list_graph_tag`, and `boost::adjacency_graph_tag` | |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | Indicates that this graph does not support multiedges | | `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 | | `traversal_category` | `boost::bidirectional_graph_tag` | Indicates that this graph is bidirectional |
| `vertices_size_type` | `LCC::size_type` | The size type of the vertex list | | `vertices_size_type` | `LCC::size_type` | The size type of the vertex list |
@ -197,14 +197,14 @@ provides the following types:
| :----------------------- | :----: | :---------- | | :----------------------- | :----: | :---------- |
| `vertex_descriptor` | `Arrangement_2::Vertex_handle` | Identify vertices in the graph. | | `vertex_descriptor` | `Arrangement_2::Vertex_handle` | Identify vertices in the graph. |
| `edge_descriptor` | `Arrangement_2::Halfedge_handle` | Identify edges in the graph. | | `edge_descriptor` | `Arrangement_2::Halfedge_handle` | Identify edges in the graph. |
| `adjacency_iterator` | Not provided| | | `adjacency_iterator` | `Vertex_around_target_iterator<Arrangement_2>`| An iterator to traverse through the vertices adjacent to a vertex. Its value type is `vertex_descriptor`.|
| `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`| | `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`| | `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` | | `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`| | `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` | This graph is directed. | | `directed_category` | `boost::directed_tag` | This graph is directed. |
| `edge_parallel_category` | `boost::allow_parallel_edge_tag` | This graph supports multiedges. | | `edge_parallel_category` | `boost::allow_parallel_edge_tag` | This graph supports multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, and `boost::edge_list_graph_tag` | The ways in which the vertices in the graph can be traversed. | | `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, `boost::edge_list_graph_tag`, and `boost::adjacency_graph_tag` | The ways in which the vertices in the graph can be traversed. |
| `vertices_size_type` | `Arrangement_2::Size` | The size type of the vertex list. | | `vertices_size_type` | `Arrangement_2::Size` | The size type of the vertex list. |
| `edges_size_type` | `Arrangement_2::Size` | The size type of the edge list. | | `edges_size_type` | `Arrangement_2::Size` | The size type of the edge list. |
| `degree_size_type` | `Arrangement_2::Size` | The size type of the adjacency list. | | `degree_size_type` | `Arrangement_2::Size` | The size type of the adjacency list. |
@ -221,20 +221,20 @@ The traits class `boost::graph_traits<OpenMesh::PolyMesh_ArrayKernelT<K> >` prov
| Member | Value | Description | | Member | Value | Description |
| :----------------------- | :----: | :---------- | | :----------------------- | :----: | :---------- |
| `vertex_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT::VertexHandle` | Identify vertices in the graph. | | `vertex_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT<K>::VertexHandle` | Identify vertices in the graph. |
| `edge_descriptor` | `unspecified_type` | Identify edges in the graph. | | `edge_descriptor` | `unspecified_type` | Identify edges in the graph. |
| `halfedge_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT::HalfedgeHandle` | Identify halfedges in the graph. | | `halfedge_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT<K>::HalfedgeHandle` | Identify halfedges in the graph. |
| `face_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT::FaceHandle` | Identify faces in the graph. | | `face_descriptor` | `OpenMesh::PolyMesh_ArrayKernelT<K>::FaceHandle` | Identify faces in the graph. |
| `adjacency_iterator` | `unspecified_type` | An iterator to traverse through the vertices adjacent to a vertex. Its value type is `vertex_descriptor`. | | `adjacency_iterator` | `CGAL::Vertex_around_target_iterator<OpenMesh::PolyMesh_ArrayKernelT<K> >` | An iterator to traverse through the vertices adjacent to a vertex. Its value type is `vertex_descriptor`. |
| `out_edge_iterator` | `CGAL::Out_edge_iterator<OpenMesh::PolyMesh_ArrayKernelT<K> >` | An iterator to traverse through the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. | | `out_edge_iterator` | `CGAL::Out_edge_iterator<OpenMesh::PolyMesh_ArrayKernelT<K> >` | An iterator to traverse through the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. |
| `in_edge_iterator` | `CGAL::In_edge_iterator<OpenMesh::PolyMesh_ArrayKernelT<K> >` | An iterator to traverse through the incoming edges incident to a vertex. Its value type is `edge_descriptor`. | | `in_edge_iterator` | `CGAL::In_edge_iterator<OpenMesh::PolyMesh_ArrayKernelT<K> >` | An iterator to traverse through the incoming edges incident to a vertex. Its value type is `edge_descriptor`. |
| `vertex_iterator` | `OpenMesh::PolyMesh_ArrayKernelT::VertexIter` | An iterator to traverse through the vertices of the graph. Its value type is `vertex_descriptor`. | | `vertex_iterator` | `OpenMesh::PolyMesh_ArrayKernelT<K>::VertexIter` | An iterator to traverse through the vertices of the graph. Its value type is `vertex_descriptor`. |
| `edge_iterator` | `unspecified_type` | An iterator to traverse through the edges of the graph. Its value type is `edge_descriptor`. | | `edge_iterator` | `unspecified_type` | An iterator to traverse through the edges of the graph. Its value type is `edge_descriptor`. |
| `halfedge_iterator` | `OpenMesh::PolyMesh_ArrayKernelT::HalfedgeIter` | An iterator to traverse through the halfedges of the graph. Its value type is `halfedge_descriptor`. | | `halfedge_iterator` | `OpenMesh::PolyMesh_ArrayKernelT<K>::HalfedgeIter` | An iterator to traverse through the halfedges of the graph. Its value type is `halfedge_descriptor`. |
| `face_iterator` | `OpenMesh::PolyMesh_ArrayKernelT::FaceIter` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. | | `face_iterator` | `OpenMesh::PolyMesh_ArrayKernelT<K>::FaceIter` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. |
| `directed_category` | `boost::undirected_tag` | This graph is not directed. | | `directed_category` | `boost::undirected_tag` | This graph is not directed. |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. | | `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, and `boost::edge_list_graph_tag` | The ways in which the vertices in the graph can be traversed. | | `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`,`boost::edge_list_graph_tag`, and`boost::adjacency_graph_tag` | The ways in which the vertices in the graph can be traversed. |
| `vertices_size_type` | `unsigned int` | The size type of the vertex list. | | `vertices_size_type` | `unsigned int` | The size type of the vertex list. |
| `edges_size_type` | `unsigned int` | The size type of the edge list. | | `edges_size_type` | `unsigned int` | The size type of the edge list. |
| `degree_size_type` | `unsigned int` | The size type of the adjacency list. | | `degree_size_type` | `unsigned int` | The size type of the adjacency list. |
@ -251,20 +251,20 @@ The traits class `boost::graph_traits<OpenMesh::TriMesh_ArrayKernelT<K> >` provi
| Member | Value | Description | | Member | Value | Description |
| :----------------------- | :----: | :---------- | | :----------------------- | :----: | :---------- |
| `vertex_descriptor` | `OpenMesh::TriMesh_ArrayKernelT::VertexHandle` | Identify vertices in the graph. | | `vertex_descriptor` | `OpenMesh::TriMesh_ArrayKernelT<K>::VertexHandle` | Identify vertices in the graph. |
| `edge_descriptor` | `unspecified_type` | Identify edges in the graph. | | `edge_descriptor` | `unspecified_type` | Identify edges in the graph. |
| `halfedge_descriptor` | `OpenMesh::TriMesh_ArrayKernelT::HalfedgeHandle` | Identify halfedges in the graph. | | `halfedge_descriptor` | `OpenMesh::TriMesh_ArrayKernelT<K>::HalfedgeHandle` | Identify halfedges in the graph. |
| `face_descriptor` | `OpenMesh::TriMesh_ArrayKernelT::FaceHandle` | Identify faces in the graph. | | `face_descriptor` | `OpenMesh::TriMesh_ArrayKernelT<K>::FaceHandle` | Identify faces in the graph. |
| `adjacency_iterator` | `unspecified_type` | An iterator to traverse through the vertices adjacent to a vertex. Its value type is `vertex_descriptor`. | | `adjacency_iterator` | `CGAL::Vertex_around_target_iterator<OpenMesh::TriMesh_ArrayKernelT<K> >` | An iterator to traverse through the vertices adjacent to a vertex. Its value type is `vertex_descriptor`. |
| `out_edge_iterator` | `CGAL::Out_edge_iterator<OpenMesh::TriMesh_ArrayKernelT<K> >` | An iterator to traverse through the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. | | `out_edge_iterator` | `CGAL::Out_edge_iterator<OpenMesh::TriMesh_ArrayKernelT<K> >` | An iterator to traverse through the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. |
| `in_edge_iterator` | `CGAL::In_edge_iterator<OpenMesh::TriMesh_ArrayKernelT<K> >` | An iterator to traverse through the incoming edges incident to a vertex. Its value type is `edge_descriptor`. | | `in_edge_iterator` | `CGAL::In_edge_iterator<OpenMesh::TriMesh_ArrayKernelT<K> >` | An iterator to traverse through the incoming edges incident to a vertex. Its value type is `edge_descriptor`. |
| `vertex_iterator` | `OpenMesh::PolyMesh_ArrayKernelT::VertexIter` | An iterator to traverse through the vertices of the graph. Its value type is `vertex_descriptor`. | | `vertex_iterator` | `OpenMesh::PolyMesh_ArrayKernelT<K>::VertexIter` | An iterator to traverse through the vertices of the graph. Its value type is `vertex_descriptor`. |
| `edge_iterator` | `unspecified_type` | An iterator to traverse through the edges of the graph. Its value type is `edge_descriptor`. | | `edge_iterator` | `unspecified_type` | An iterator to traverse through the edges of the graph. Its value type is `edge_descriptor`. |
| `halfedge_iterator` | `OpenMesh::TriMesh_ArrayKernelT::HalfedgeIter` | An iterator to traverse through the halfedges of the graph. Its value type is `halfedge_descriptor`. | | `halfedge_iterator` | `OpenMesh::TriMesh_ArrayKernelT<K>::HalfedgeIter` | An iterator to traverse through the halfedges of the graph. Its value type is `halfedge_descriptor`. |
| `face_iterator` | `OpenMesh::TriMesh_ArrayKernelT::FaceIter` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. | | `face_iterator` | `OpenMesh::TriMesh_ArrayKernelT<K>::FaceIter` | An iterator to traverse through the faces of the graph. Its value type is `face_descriptor`. |
| `directed_category` | `boost::undirected_tag` | This graph is not directed. | | `directed_category` | `boost::undirected_tag` | This graph is not directed. |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. | | `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, and `boost::edge_list_graph_tag` | The ways in which the vertices in the graph can be traversed. | | `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::vertex_list_graph_tag`, `boost::edge_list_graph_tag`, and `boost::adjacency_graph_tag` | The ways in which the vertices in the graph can be traversed. |
| `vertices_size_type` | `unsigned int` | The size type of the vertex list. | | `vertices_size_type` | `unsigned int` | The size type of the vertex list. |
| `edges_size_type` | `unsigned int` | The size type of the edge list. | | `edges_size_type` | `unsigned int` | The size type of the edge list. |
| `degree_size_type` | `unsigned int` | The size type of the adjacency list. | | `degree_size_type` | `unsigned int` | The size type of the adjacency list. |