mirror of https://github.com/CGAL/cgal
Fixes after Sebastien's review
This commit is contained in:
parent
0f0e88ab47
commit
42880ee221
|
|
@ -16,6 +16,7 @@ class EdgeListGraph{};
|
|||
/*! \relates EdgeListGraph
|
||||
* returns an iterator range over all edges.
|
||||
*/
|
||||
template <typename EdgeListGraph>
|
||||
std::pair<boost::graph_traits<EdgeListGraph>::edge_iterator,
|
||||
boost::graph_traits<EdgeListGraph>::edge_iterator>
|
||||
edges(const EdgeListGraph& g);
|
||||
|
|
@ -26,6 +27,7 @@ edges(const EdgeListGraph& g);
|
|||
\attention `num_edges()` may return a number larger than `std::distance(edges(g).first, edges(g).second)`.
|
||||
This is the case for implementations only marking edges deleted in the edge container.
|
||||
*/
|
||||
template <typename EdgeListGraph>
|
||||
boost::graph_traits<EdgeListGraph>::ver_size_type
|
||||
num_edges(const EdgeListGraph& g);
|
||||
|
||||
|
|
@ -33,12 +35,14 @@ num_edges(const EdgeListGraph& g);
|
|||
/*! \relates EdgeListGraph
|
||||
returns the source vertex of `h`.
|
||||
*/
|
||||
template <typename EdgeListGraph>
|
||||
boost::graph_traits<EdgeListGraph>::vertex_descriptor
|
||||
source(boost::graph_traits<EdgeListGraph>::halfedge_descriptor h, EdgeListGraph& g);
|
||||
source(boost::graph_traits<EdgeListGraph>::halfedge_descriptor h, const EdgeListGraph& g);
|
||||
|
||||
|
||||
/*! \relates EdgeListGraph
|
||||
returns the target vertex of `h`.
|
||||
*/
|
||||
template <typename EdgeListGraph>
|
||||
boost::graph_traits<EdgeListGraph>::vertex_descriptor
|
||||
target(boost::graph_traits<EdgeListGraph>::halfedge_descriptor h, EdgeListGraph& g);
|
||||
target(boost::graph_traits<EdgeListGraph>::halfedge_descriptor h, const EdgeListGraph& g);
|
||||
|
|
|
|||
|
|
@ -18,23 +18,27 @@ class FaceGraph {};
|
|||
/*! \relates FaceGraph
|
||||
returns the face incident to halfedge `h`.
|
||||
*/
|
||||
template <typename FaceGraph>
|
||||
boost::graph_traits<FaceGraph>::face_descriptor
|
||||
face(boost::graph_traits<FaceGraph>::halfedge_descriptor h, FaceGraph& g);
|
||||
face(boost::graph_traits<FaceGraph>::halfedge_descriptor h, const FaceGraph& g);
|
||||
|
||||
/*! \relates FaceGraph
|
||||
returns the halfedge incident to face `f`.
|
||||
*/
|
||||
template <typename FaceGraph>
|
||||
boost::graph_traits<FaceGraph>::halfedge_descriptor
|
||||
halfedge(boost::graph_traits<FaceGraph>::face_descriptor f, FaceGraph& g);
|
||||
halfedge(boost::graph_traits<FaceGraph>::face_descriptor f, const FaceGraph& g);
|
||||
|
||||
/*! \relates FaceGraph
|
||||
returns the number of halfedges incident to face `f`.
|
||||
*/
|
||||
template <typename FaceGraph>
|
||||
boost::graph_traits<FaceGraph>::degree_size_type
|
||||
degree(boost::graph_traits<FaceGraph>::face_descriptor f, FaceGraph& g);
|
||||
degree(boost::graph_traits<FaceGraph>::face_descriptor f, const FaceGraph& g);
|
||||
|
||||
/*! \relates FaceGraph
|
||||
returns a special face that is not equal to any other face.
|
||||
*/
|
||||
template <typename FaceGraph>
|
||||
boost::graph_traits<FaceGraph>::face_descriptor
|
||||
null_face(FaceGraph& g);
|
||||
null_face(const FaceGraph& g);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class FaceListGraph{};
|
|||
/*! \relates FaceListGraph
|
||||
* returns an iterator range over all faces.
|
||||
*/
|
||||
|
||||
template <typename FaceListGraph>
|
||||
std::pair<boost::graph_traits<FaceListGraph>::face_iterator,
|
||||
boost::graph_traits<FaceListGraph>::face_iterator>
|
||||
faces(const FaceListGraph& g);
|
||||
|
|
@ -27,7 +27,7 @@ faces(const FaceListGraph& g);
|
|||
\attention `num_faces()` may return a number larger than `std::distance(faces(g).first, faces(g).second)`.
|
||||
This is the case for implementations only marking faces deleted in the face container.
|
||||
*/
|
||||
|
||||
template <typename FaceListGraph>
|
||||
boost::graph_traits<FaceListGraph>::face_size_type
|
||||
num_faces(const FaceListGraph& g);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,64 +27,74 @@ A model of `HalfedgeGraph` must have the interior property `vertex_point` attach
|
|||
class HalfedgeGraph {};
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the edge corresponding to halfedges `h` and `opposite(h)` .
|
||||
returns the edge corresponding to halfedges `h` and `opposite(h)`.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::edge_descriptor
|
||||
edge(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
edge(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns one of the halfedges corresponding to `e`.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
halfedge(boost::graph_traits<HalfedgeGraph>::edge_descriptor f, HalfedgeGraph& g);
|
||||
halfedge(boost::graph_traits<HalfedgeGraph>::edge_descriptor f, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns a halfedge with target `v`.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
halfedge(boost::graph_traits<HalfedgeGraph>::vertex_descriptor v, HalfedgeGraph& g);
|
||||
halfedge(boost::graph_traits<HalfedgeGraph>::vertex_descriptor v, const HalfedgeGraph& g);
|
||||
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the halfedge with source `u` and target `v`. The Boolean is `true`, iff this halfedge exists.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
std::pair<boost::graph_traits<HalfedgeGraph>::halfedge_descriptor,bool>
|
||||
halfedge(boost::graph_traits<HalfedgeGraph>::vertex_descriptor u,
|
||||
boost::graph_traits<HalfedgeGraph>::vertex_descriptor v,
|
||||
HalfedgeGraph& g);
|
||||
const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the halfedge with source and target swapped.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
opposite(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
opposite(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the source vertex of `h`.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::vertex_descriptor
|
||||
source(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
source(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the target vertex of `h`.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::vertex_descriptor
|
||||
target(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
target(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the next halfedge around its face.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
next(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
next(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns the previous halfedge around its face.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
prev(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, HalfedgeGraph& g);
|
||||
prev(boost::graph_traits<HalfedgeGraph>::halfedge_descriptor h, const HalfedgeGraph& g);
|
||||
|
||||
/*! \relates HalfedgeGraph
|
||||
returns a special halfedge that is not equal to any other halfedge.
|
||||
*/
|
||||
template <typename HalfedgeGraph>
|
||||
boost::graph_traits<HalfedgeGraph>::halfedge_descriptor
|
||||
null_halfedge(HalfedgeGraph& g);
|
||||
null_halfedge(const HalfedgeGraph& g);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class HalfedgeListGraph {};
|
|||
/*! \relates HalfedgeListGraph
|
||||
* returns an iterator range over all halfedges.
|
||||
*/
|
||||
|
||||
template <typename HalfedgeListGraph>
|
||||
std::pair<boost::graph_traits<HalfedgeListGraph>::halfedge_iterator,
|
||||
boost::graph_traits<HalfedgeListGraph>::halfedge_iterator>
|
||||
halfedges(const HalfedgeListGraph& g);
|
||||
|
|
@ -27,7 +27,7 @@ halfedges(const HalfedgeListGraph& g);
|
|||
\attention `num_halfedges()` may return a number larger than `std::distance(halfedges(g).first, halfedges(g).second)`.
|
||||
This is the case for implementations only marking halfedges deleted in the halfedge container.
|
||||
*/
|
||||
|
||||
template <typename HalfedgeListGraph>
|
||||
boost::graph_traits<HalfedgeListGraph>::halfedge_size_type
|
||||
num_halfedges(const FaceListGraph& g);
|
||||
num_halfedges(const HalfedgeListGraph& g);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,28 +16,34 @@ class MutableFaceGraph{};
|
|||
/*! \relates MutableFaceGraph
|
||||
Adds a new face to the graph without initializing the connectivity.
|
||||
*/
|
||||
template <typename MutableFaceGraph>
|
||||
boost::graph_traits<MutableFaceGraph>::face_descriptor
|
||||
add_face(MutableFaceGraph& g);
|
||||
|
||||
/*! \relates MutableFaceGraph
|
||||
Removes `f` from the graph.
|
||||
*/
|
||||
template <typename MutableFaceGraph>
|
||||
boost::graph_traits<MutableFaceGraph>::face_descriptor
|
||||
remove_face(boost::graph_traits<MutableFaceGraph>::face_descriptor f, MutableFaceGraph& g);
|
||||
|
||||
/*! \relates MutableFaceGraph
|
||||
Sets the corresponding face of `h` to `f`.
|
||||
*/
|
||||
template <typename MutableFaceGraph>
|
||||
void
|
||||
set_face(boost::graph_traits<MutableFaceGraph>::halfedge_descriptor h, boost::graph_traits<MutableFaceGraph>::face_descriptor f, MutableFaceGraph& g);
|
||||
|
||||
/*! \relates MutableFaceGraph
|
||||
Sets the corresponding halfedge of `f` to `h`.
|
||||
*/
|
||||
template <typename MutableFaceGraph>
|
||||
void
|
||||
set_halfedge(boost::graph_traits<MutableFaceGraph>::face_descriptor f, boost::graph_traits<MutableFaceGraph>::halfedge_descriptor h, MutableFaceGraph& g);
|
||||
|
||||
/*! \relates MutableFaceGraph
|
||||
Indicates the expected size of vertices (`nv`), edges (`ed`) and faces (`nf`).
|
||||
*/
|
||||
template <typename MutableFaceGraph>
|
||||
void
|
||||
reserve(MutableFaceGraph& g, boost::graph_traits<MutableFaceGraph>::vertices_size_type nv, boost::graph_traits<MutableFaceGraph>::vertices_size_type ne, boost::graph_traits<MutableFaceGraph>::vertices_size_type nf);
|
||||
|
|
|
|||
|
|
@ -18,24 +18,28 @@ class MutableHalfedgeGraph{};
|
|||
/*! \relates MutableFaceGraph
|
||||
Adds a new vertex to the graph without initializing the connectivity.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
boost::graph_traits<MutableHalfedgeGraph>::face_descriptor
|
||||
add_vertex(MutableHalfedgeGraph& g);
|
||||
|
||||
/*! \relates MutableHalfedgeGraph
|
||||
Removes `v` from the graph.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
boost::graph_traits<MutableHalfedgeGraph>::face_descriptor
|
||||
remove_vertex(boost::graph_traits<MutableHalfedgeGraph>::vertex_descriptor v, MutableHalfedgeGraph& g);
|
||||
|
||||
/*! \relates MutableFaceGraph
|
||||
Adds two opposite halfedges to the graph without initializing the connectivity.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
boost::graph_traits<MutableHalfedgeGraph>::edge_descriptor
|
||||
add_edge(MutableHalfedgeGraph& g);
|
||||
|
||||
/*! \relates MutableHalfedgeGraph
|
||||
Removes the two halfedges corresponding to `e` from the graph.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
boost::graph_traits<MutableHalfedgeGraph>::face_descriptor
|
||||
remove_edge(boost::graph_traits<MutableHalfedgeGraph>::edge_descriptor e, MutableHalfedgeGraph& g);
|
||||
|
||||
|
|
@ -43,12 +47,14 @@ remove_edge(boost::graph_traits<MutableHalfedgeGraph>::edge_descriptor e, Mutabl
|
|||
/*! \relates MutableHalfedgeGraph
|
||||
Sets the target vertex of `h` and the source of `opposite(h)` to `v`.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
void
|
||||
set_target(boost::graph_traits<MutableHalfedgeGraph>::halfedge_descriptor h, boost::graph_traits<MutableHalfedgeGraph>::vertex_descriptor v, MutableHalfedgeGraph& g);
|
||||
|
||||
/*! \relates MutableHalfedgeGraph
|
||||
Sets the halfedge of `v` to `h`. The target vertex of `h` must be `v`.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
void
|
||||
set_halfedge(boost::graph_traits<MutableHalfedgeGraph>::vertex_descriptor v, boost::graph_traits<MutableHalfedgeGraph>::halfedge_descriptor h, MutableHalfedgeGraph& g);
|
||||
|
||||
|
|
@ -56,5 +62,6 @@ set_halfedge(boost::graph_traits<MutableHalfedgeGraph>::vertex_descriptor v, boo
|
|||
/*! \relates MutableHalfedgeGraph
|
||||
Sets the successor of `h1` around a face to `h2`, and the prededecessor of `h2` to `h1`.
|
||||
*/
|
||||
template <typename MutableHalfedgeGraph>
|
||||
void
|
||||
set_next(boost::graph_traits<MutableHalfedgeGraph>::halfedge_descriptor h1, boost::graph_traits<MutableHalfedgeGraph>::halfede_descriptor h2, MutableHalfedgeGraph& g);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class VertexListGraph{};
|
|||
/*! \relates VertexListGraph
|
||||
* returns an iterator range over all vertices.
|
||||
*/
|
||||
|
||||
template <typename VertexListGraph>
|
||||
std::pair<boost::graph_traits<VertexListGraph>::vertex_iterator,
|
||||
boost::graph_traits<VertexListGraph>::vertex_iterator>
|
||||
vertices(const VertexListGraph& g);
|
||||
|
|
@ -27,7 +27,7 @@ vertices(const VertexListGraph& g);
|
|||
\attention `num_vertices()` may return a number larger than `std::distance(vertices(g).first, vertices(g).second)`.
|
||||
This is the case for implementations only marking vertices deleted in the vertex container.
|
||||
*/
|
||||
|
||||
template <typename VertexListGraph>
|
||||
boost::graph_traits<VertexListGraph>::ver_size_type
|
||||
num_vertices(const VertexListGraph& g);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ Valid Expression | Returns
|
|||
`prev(h, g)` | `halfedge_descriptor` | The previous halfedge around its face.
|
||||
`boost::graph_traits<G>::%null_halfedge()` | `halfedge_descriptor` | Returns a special halfedge that is not equal to any other halfedge.
|
||||
|
||||
The `HalfedgeGraph`has the invariant `halfedge(edge(h,g))==h`.
|
||||
|
||||
\cgalHeading{%MutableHalfedgeGraph}
|
||||
|
||||
The concept `MutableHalfedgeGraph` refines the concept `HalfedgeGraph`
|
||||
|
|
|
|||
Loading…
Reference in New Issue