Additions to the manual and examples

This commit is contained in:
Fernando Cacciola 2006-09-11 16:53:53 +00:00
parent 7c4f4f03a7
commit 2b42feb933
17 changed files with 618 additions and 131 deletions

11
.gitattributes vendored
View File

@ -362,7 +362,16 @@ Arrangement_of_spheres_3/test/Arrangement_of_spheres_3/data/simple.spheres -text
Arrangement_of_spheres_3/test/Arrangement_of_spheres_3/data/two.spheres -text svneol=unset#application/octet-stream
Arrangement_of_spheres_3/test/Arrangement_of_spheres_3/the_plan -text
BGL/doc_tex/BGL.tex -text
BGL/doc_tex/BGL_ref/ConnectedPlanarGeometricGraph.tex -text
BGL/doc_tex/BGL/BGL.tex -text
BGL/doc_tex/BGL/PkgDescription.tex -text
BGL/doc_tex/BGL/main.tex -text
BGL/doc_tex/BGL_ref/ConnectedPlanarDirectedGeometricGraph.tex -text
BGL/doc_tex/BGL_ref/HalfedgeGraph.tex -text
BGL/doc_tex/BGL_ref/Polyhedron_geometric_graph_traits.tex -text
BGL/doc_tex/BGL_ref/Polyhedron_graph_traits.tex -text
BGL/doc_tex/BGL_ref/Polyhedron_graph_traits_const.tex -text
BGL/doc_tex/BGL_ref/Polyhedron_halfedge_graph_traits.tex -text
BGL/doc_tex/BGL_ref/Polyhedron_halfedge_graph_traits_const.tex -text
BGL/doc_tex/BGL_ref/intro.tex -text
BGL/doc_tex/BGL_ref/main.tex -text
BGL/include/CGAL/boost/graph/HalfedgeDS_BGL_aux.h -text

View File

@ -6,7 +6,7 @@
\documentclass{book}
\usepackage{Manual/cgal_manual}
\gdef\lciManualTitle{Boost Graph Library (\ccc{BGL}) interface to \cgal\}
\gdef\lciManualTitle{Boost Graph Library (BGL) interface to CGAL.}
\makeindex
@ -15,7 +15,7 @@
\begin{document}
\cgaltitlepage{Boost Graph Library (\ccc{BGL}) interface to \cgal\}
\cgaltitlepage{Boost Graph Library (BGL) interface to CGAL. }
\cleardoublepage
\pagenumbering{roman}
@ -27,7 +27,7 @@
\setcounter{page}{1}
\cgalchapters{
%\entryleftright{\part{User Manual}}{\part{Reference Manual}}
\entryleftright{\part{User Manual}}{\part{Reference Manual}}
\lcTex{\entryright{\listofrefpages}}
\packageleftright{BGL}{BGL_ref}
}

26
BGL/doc_tex/BGL/BGL.tex Normal file
View File

@ -0,0 +1,26 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\section{Introduction}
This \cgal\ package provides a framework for interfacing \cgal\ data structures as \ccc{BGL} (Boost Graph Library) graphs.
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of sfsooter
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,7 @@
\begin{ccPkgDescription}{Boost Graph Library (BGL) interface to CGAL \label{Pkg:BGL}}
\ccPkgHowToCiteCgal{cgal:c-sspo2-06}
\ccPkgSummary{This package provides a framework for interfacing \cgal\ data structures as BGL graphs}
\ccPkgIntroducedInCGAL{3.3}
\ccPkgLicense{\ccLicenseQPL}
\end{ccPkgDescription}

18
BGL/doc_tex/BGL/main.tex Normal file
View File

@ -0,0 +1,18 @@
% +------------------------------------------------------------------------+
% | CBP Reference Manual: main.tex
% +------------------------------------------------------------------------+
% | Automatically generated driver file for the reference manual chapter
% | of this package. Do not edit manually, you may loose your changes.
% +------------------------------------------------------------------------+
% alfabatisch
\ccUserChapter{Boost Graph Library (BGL) interface to CGAL \label{chapter-BGL}}
\ccChapterAuthor{Fernando Cacciola}
%\input{Surface_mesh_simplification/PkgDescription.tex}
\minitoc
\input{BGL/BGL.tex}
%% EOF

View File

@ -0,0 +1,116 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefConcept}{ConnectedPlanarDirectedGeometricGraph}
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[concept]{} %% add further index entries
\ccDefinition
The concept \ccRefName\ describes the requirements and constrians of a \ccc{Boost Graph} commonly found in geometric data structures.
\ccHeading{Requirements}
\begin{description}
\item[Connected]
Any vertex is connected to any other vertex via some path (a sequence of adjacent vertices).
The graph must be at least {\em 2-connected}. That is, it cannot have any {\em terminal} vertex (incident upon just 1 edge).
\item[Planar]
The graph \textit{can} be drawn without crossing edges \textit{and} the straight line segments implicitely connecting the vertices do not intersect except at the vertices.
\item[Directed]
All edges are {\em ordered} pair of vertices.
\item[Geometric]
The vertices embeed geometric points (in any geometric dimension) and its edges are {\em implicitely assumed} to be straight line segments (even if a concrete model embeeds a different type of curve).
\end{description}
Additionally, the vertices and edges of this graph are required to have a distinguishible \ccc{null} state such that any default constructed vertex or edge is formally \ccc{null}.
\ccRefines
\ccc{BidirectionalGraph}
\ccc{AdjacencyGraph}
\ccc{EdgeAndVertexListGraph}
\ccTypes
\ccNestedType{Point}{The Point type of the vertex, in whatever dimension}{}
\ccOperations
Following the BGL interface, the following graph operations are defined as free rather than member functions.
\ccFunction
{template<class Graph>
typename boost::graph_traits<Graph const>::edge_descriptor
opposite_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
}
{Given the edge \ccc{e: s->t}, returns the edge with opposite direction: \ccc{t->s}.
If the resulting edge does not belong to \ccc{g} the result is a \ccc{null} (default constructed) edge.\\
[non-const version ommited]
}
\ccFunction
{template<class Graph>
typename boost::graph_traits<Graph const>::edge_descriptor
next_edge_ccw(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
}
{Given the edge \ccc{e} with source vertex \ccc{s}, returns the first edge with the same source vertex which
is found in a Counter-clockwise rotation around \ccc{s}.
Since a \ccRefName\ is required to be {\em 2-connected}, the result is always different from \ccc{e}.
}
\ccFunction
{template<class Graph>
typename boost::graph_traits<Graph const>::edge_descriptor
next_edge_cw(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
}
{Given the edge \ccc{e} with source vertex \ccc{s}, returns the first edge with the same source vertex which
is found in a Clockwise rotation around \ccc{s}.
Since a \ccRefName\ is required to be at least {\em 2-connected}, the result is always different from \ccc{e}.
}
\ccFunction
{template<class Graph>
typename CGAL::geometric_graph_traits<Graph>::Point const&
get_point(typename boost::graph_traits<Graph const>::vertex_descriptor v, Graph const& g );
}
{Returns the point of the vertex \ccc{v} belonging to the graph \ccc{g}\\
[non-const version ommited].
}
\ccFunction
{template<class Graph>
void set_point(typename boost::graph_traits<Graph>::vertex_descriptor v
,Graph& g
,typename CGAL::geometric_graph_traits<Graph>::Point p
);
}
{Sets \ccc{p} as the point of the vertex \ccc{v} belonging to the graph \ccc{g}.}
\ccHasModels
\ccRefIdfierPage{boost::graph_traits< CGAL::Polyhedron_3<Traits> const > }\\
\ccRefIdfierPage{boost::graph_traits< CGAL::Polyhedron_3<Traits> > }\\
\ccRefIdfierPage{CGAL::geometric_graph_traits< CGAL::Polyhedron_3<Traits> > }\\
\end{ccRefConcept}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -1,60 +0,0 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefConcept}{ConnectedPlanarGeometricGraph}
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[concept]{} %% add further index entries
\ccDefinition
The concept \ccRefName\ describes the requirements and constrians of a \ccc{Boost Graph} commonly found in geometric data structures.
This graph is {\em Geometric} meaning that its vertices embeed geometric points (in any geometric dimension) and its edges are {\em implicitely assumed} to be straight line segments (even if a concrete model embeeds a different type of curve).
This graph is {\em Planar} meaning that it \textit{can} be drawn without crossing edges. The planarity requirement is only topological: there is no requirement that the straight line segments implicitely connecting the vertices do not intersect.
The graph is {\em Connected} meaning that any vertex is connected to any other vertex via some path (a sequence of adjacent vertices).
\ccRefines
\ccc{BidirectionalGraph}
\ccc{AdjacencyGraph}
\ccc{EdgeAndVertexListGraph}
\ccTypes
\ccNestedType{TSM}{The type of the surface to simplify}{}
\ccGlue
\ccTypedef{typename Surface_geometric_traits<TSM>::FT FT ;}{The FieldType that represents the collapse cost}
\ccGlue
\ccTypedef{typename Surface_geometric_traits<TSM>::Point Point ;}{The Point type of the surface vertex}
\ccCreation
\ccCreationVariable{g} %% choose variable name
\ccOperations
\ccMethod{boost::get(boost::vertex_point_t(),g,voptional<FT> cost() const;}{The cached cost.}
\ccGlue
\ccMethod{boost::optional<Point> placement() const;}{The cached placement.}
\ccHasModels
\ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Full_collapse_data<TSM>}.
\end{ccRefConcept}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,90 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefConcept}{HalfedgeGraph}
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[concept]{} %% add further index entries
\ccDefinition
The concept \ccRefName\ describes the requirements and constrians of a \ccc{Boost Graph} representing a subset of a \ccc{HalfedgeDS}.
This is a \ccc{ConnectedPlanarDirectedGeometricGraph} with the added requirement that for each directed edge \ccc{s->t} it's opposite edge \ccc{t->s} is part of the graph, that is, the directed edges are neccesarily symmetric. Furthermore, becasue the symmetry is mandatory, there is the added concept of an {\em undirected} edge which corresponds to both symmetric edges as a whole.
The graph is strictly {\em 4-connected}, that is, each vertex has exactly 4 incident edges. Furthermore, it is strictly {\em 2-connected} in each direction, that is, each vertex has 2 {\em incoming} and 2 {\em outgoing} edges, and each incoming edge is followed by one outgoing edge.\\
For every vertex \ccc{b} there are exactly 4 incident edges: \ccc{a->b}, \ccc{b->a}, \ccc{b->c} and \ccc{c->b} with \ccc{c!=a}. Edge \ccc{b->c} is called the {\em successor} of edge \ccc{a->b}, while edge \ccc{a->b} is called the {\em predeccesor} of edge \ccc{b->c}. Each and every edge is required to have a successor and a predecessor, hence the graph must have at least 3 vertices and 6 edges.
For each pair of {\em symmetric directed edges} \ccc{s->t} and \ccc{t->s}, there is a correspoding {\em undirected} edge \ccc{s-t}. Therefore, the number of undirected edges is exactly half the number of directed edges.
{\em Symmetric directed edges} are NOT called \ccc{halfedges} (as in a \ccc{HalfedgeDS}) because from the point of view of this graph, being a refinement of a BGL graph, each symmetric directed edge is a {\em whole} edge in itself. In other words, the unqualified term edge refers to one and only one symmetric directed edge and not both. The pair of opposing edges, seen as a unity, is an {\em undirected edge}. Such an undirected edge refers to the pair of opposing edges and this concept does not require the existence of a texplicit ype representing that. In other words, there is only one type of edge, hence only one \ccc{edge\_descriptor}, which refers to the directed edge. An undirected edge is implicitely addressed by an edge\_descriptor. There is no requirement about which of the directed edges of the pair must be used to refer to an undirected edge.
All edges are {\em cyclically connected} and each cycle implicitely corresponds to a \ccc{facet} (or \ccc{face} or \ccc{cell}) of the underlying data structure (with the exception of the cycle(s) corresponding to the border(s) of the underlying DS, which might not have an associated facet).
\ccRefines
\ccc{ConnectedPlanarDirectedGeometricGraph}
\ccTypes
\ccNestedType{undirected_edge_iterator}{An iterator that iterates over one and only one of the directed edges
in each opposing pair. This iterator accesses a directed edge (as represented by an \ccc{edge_descriptor})
and not an undirected edge since there is no such kind of edge explicitely}{}
\ccOperations
Following the BGL interface, the following graph operations are defined as free rather than member functions.
\ccFunction
{template<class Graph>
typename boost::graph_traits<Graph const>::edge_descriptor
next_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
}
{Returns the {\em successor} of \ccc{e}.
That is, given the edge \ccc{a->b} returns \ccc{b->c} such that \ccc{c != a}.\\
[non-const version ommited]
}
\ccFunction
{template<class Graph>
typename boost::graph_traits<Graph const>::edge_descriptor
prev_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
}
{Returns the {\em predecessor} of \ccc{e}.
That is, given the edge \ccc{b->c} returns \ccc{a->b} such that \ccc{c != a}\\
[non-const version ommited]
}
\ccFunction
{template<class Graph>
std::pair < typename boost::halfedge_graph_traits<Graph const>::edge_descriptor
,typename boost::halfedge_graph_traits<Graph const>::edge_descriptor
>
undirected_edges(Graph const& g );
}
{Returns a pair of iterators representing the range [begin,end) of undirected edges in this graph.
[non-const version ommited]
}
\ccHasModels
\ccRefIdfierPage{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> const > }\\
\ccRefIdfierPage{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> > }\\
\end{ccRefConcept}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,44 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefClass}{CGAL::geometric_graph_traits< CGAL::Polyhedron_3<Traits> >}
%% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccDefinition
The class \ccRefName\ and corresponding free-function overloads provides the specializations for \ccc{Polyhedron_3} required to make it a model of a \ccc{ConnectedPlanarDirectedGeometricGraph}.
\ccInclude{CGAL/boost/graph/Polyhedron_geometric_graph_traits.h}
\ccTypes
\ccTypedef{typename Polyhedron_3::Point_3 Point ;}{The 3D Point type of the vertex.}
\ccIsModel
\ccc{ConnectedPlanarDirectedGeometricGraph}
\ccSeeAlso
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,83 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefClass}{boost::graph_traits< CGAL::Polyhedron_3<Traits> >}
%% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccDefinition
The class \ccRefName\ and corresponding free-function overloads provides the specializations for \ccc{Polyhedron_3} required to make it a {\em mutable} model of the Boost Graph types: \ccc{BidirectionalGraph}, \ccc{AdjacencyGraph} and \ccc{EdgeAndVertexListGraph}.
\ccInclude{CGAL/boost/graph/Polyhedron_graph_traits.h}
\ccTypes
\ccTypedef{typename Polyhedron_3::Vertex_handle vertex_descriptor;}
{The vertex descriptor.}
\ccTypedef{typename Polyhedron_3::Halfedge_handle edge_descriptor;}
{The edges descriptor.}
\ccTypedef{-implementation-defined- vertex_iterator;}{A \ccc{Polyhedron_3::Vertex_iterator}
wrapped to return a \ccc{Polyhedron_3::Vertex_handle} when dereferenced.}
\ccTypedef{-implementation-defined- edge_iterator;}{A \ccc{Polyhedron_3::Halfedge_iterator}
wrapped to return a \ccc{Polyhedron_3::Halfedge_handle} when dereferenced.}
\ccTypedef{-implementation-defined- in_edge_iterator;}{An edge iterator which only iterates over
the incoming \ccc{halfedges} around a vertex. It correspons to a
\ccc{Polyhedron_3::Halfedge_around_vertex_circulator}
wrapped to return an \ccc{Polyhedron_3::Halfege_handle} when dereferenced}
\ccTypedef{-implementation-defined- out_edge_iterator;}{An edge iterator which only iterates over
the outgoing halfedges around a vertex. It correspons to a \ccc{Polyhedron_3::Halfedge_around_vertex_circulator}
wrapped to return an \ccc{Polyhedron_3::Halfege_handle} referring to the {\em opposite halfege} when
dereferenced.}
\ccTypedef{boost::directed_tag directed_category;}{Indicates this is a directed graph.}
\ccTypedef{boost::disallow_parallel_edge_tag edge_parallel_category;}
{Indicates this graph does not support multiedges.}
\ccTypedef{boost::bidirectional_graph_tag traversal_category;}
{Indicates this graph is bidirectional.}
\ccTypedef{typename Polyhedron_3::size_type vertices_size_type;}
{The size tye of the vertex list.}
\ccTypedef{typename Polyhedron_3::size_type edges_size_type;}
{The size tye of the edge list.}
\ccTypedef{typename Polyhedron_3::size_type degree_size_type;}
{The size tye of the adjacency list.}
\ccIsModel
\ccc{BidirectionalGraph}
\ccc{AdjacencyGraph}
\ccc{EdgeAndVertexListGraph}
\ccSeeAlso
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,85 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefClass}{boost::graph_traits< CGAL::Polyhedron_3<Traits> const>}
%% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccDefinition
The class \ccRefName\ and corresponding free-function overloads provides the specializations for \ccc{Polyhedron_3 const} required to make it a {\em read-only} model of the Boost Graph types: \ccc{BidirectionalGraph}, \ccc{AdjacencyGraph} and \ccc{EdgeAndVertexListGraph}.
\ccInclude{CGAL/boost/graph/Polyhedron_graph_traits.h}
\ccTypes
\ccTypedef{typename Polyhedron_3::Vertex_const_handle vertex_descriptor;}
{The vertex descriptor.}
\ccTypedef{typename Polyhedron_3::Halfedge_const_handle edge_descriptor;}
{The edges descriptor.}
\ccTypedef{-implementation-defined- vertex_iterator;}{A \ccc{Polyhedron_3::Vertex_const_iterator}
wrapped to return a \ccc{Polyhedron_3::Vertex_const_handle} when dereferenced.}
\ccTypedef{-implementation-defined- edge_iterator;}{A \ccc{Polyhedron_3::Halfedge_const_iterator}
wrapped to return a \ccc{Polyhedron_3::Halfedge_const_handle} when dereferenced.}
\ccTypedef{-implementation-defined- in_edge_iterator;}{An edge iterator which only iterates over
the incoming \ccc{halfedges} around a vertex.\\It correspons to a
\ccc{Polyhedron_3::Halfedge_around_vertex_const_circulator}
wrapped to return an \ccc{Polyhedron_3::Halfege_const_handle} when dereferenced}
\ccTypedef{-implementation-defined- out_edge_iterator;}{An edge iterator which only iterates over
the outgoing halfedges around a vertex. It correspons to a
\ccc{Polyhedron_3::Halfedge_around_vertex_const_circulator}
wrapped to return an \ccc{Polyhedron_3::Halfege_const_handle} referring to the
{\em opposite halfege} when dereferenced.}
\ccTypedef{boost::directed_tag directed_category;}
{Indicates this is a directed graph.}
\ccTypedef{boost::disallow_parallel_edge_tag edge_parallel_category;}
{Indicates this graph does not support multiedges.}
\ccTypedef{boost::bidirectional_graph_tag traversal_category;}
{Indicates this graph is bidirectional.}
\ccTypedef{typename Polyhedron_3::size_type vertices_size_type;}
{The size tye of the vertex list.}
\ccTypedef{typename Polyhedron_3::size_type edges_size_type;}
{The size tye of the edge list.}
\ccTypedef{typename Polyhedron_3::size_type degree_size_type;}
{The size tye of the adjacency list.}
\ccIsModel
\ccc{BidirectionalGraph}
\ccc{AdjacencyGraph}
\ccc{EdgeAndVertexListGraph}
\ccSeeAlso
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,46 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefClass}{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >}
%% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccDefinition
The class \ccRefName\ and corresponding free-function overloads provides the specializations for \ccc{Polyhedron_3} required to make it a \ccc{mutable} model of a \ccc{HalfedgeGraph}.
\ccInclude{CGAL/boost/graph/Polyhedron_halfedge_graph_traits.h}
\ccTypes
\ccTypedef{typename -implementation-defined- undirected_edge_iterator;}{An edge iterator that iterates
over 1 out of 2 halfedges, each time pointing to one and only one of the halfedges for each opposing pair.
When dereferenced, it returns a \ccc{Polyhedron_3::Halfedge_const_handle}}
\ccIsModel
\ccc{HalfedgeGraph}
\ccSeeAlso
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -0,0 +1,46 @@
%% Copyright (c) 2004 SciSoft. All rights reserved.
%%
%% This file is part of CGAL (www.cgal.org); you may redistribute it under
%% the terms of the Q Public License version 1.0.
%% See the file LICENSE.QPL distributed with CGAL.
%%
%% 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.
%%
%%
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\begin{ccRefClass}{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> >}
%% add template arg's if necessary
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccDefinition
The class \ccRefName\ and corresponding free-function overloads provides the specializations for \ccc{Polyhedron_3} required to make it a model of a \ccc{HalfedgeGraph}.
\ccInclude{CGAL/boost/graph/Polyhedron_halfedge_graph_traits.h}
\ccTypes
\ccTypedef{typename -implementation-defined- undirected_edge_iterator;}{An edge iterator that iterates
over 1 out of 2 halfedges, each time pointing to one and only one of the halfedges for each opposing pair.
When dereferenced, it returns a \ccc{Polyhedron_3::Halfedge_handle}}
\ccIsModel
\ccc{HalfedgeGraph}
\ccSeeAlso
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -14,20 +14,23 @@
%%
%% Author(s) : Fernando Cacciola <fernando_cacciola@hotmail.com>
\ccRefChapter{Boost Graph Library (\ccc{BGL}) interface to \cgal\ \label{ref-chapter-bgl}}
\ccRefChapter{Boost Graph Library (BGL) interface to CGAL \label{ref-chapter-BGL}}
This chapter introduces the concepts and classes that correspond to the \cgal\ \ccc{BGL} package.\\
The packages provides a framework for interfacing \cgal\ incidence data structures to BGL algorithms.
The packages provides a framework for interfacing \cgal\ data structures as \ccc{BGL} graphs.
\section{Classified Reference Pages}
\ccHeading{Concepts}
\ccRefConceptPage{ConnectedPlanarGraph} \\
\ccRefConceptPage{ConnectedPlanarDirectedGraph} \\
\ccRefConceptPage{ConnectedPlanarDirectedGeometricGraph} \\
\ccRefConceptPage{HalfedgeGraph} \\
\ccHeading{Classes}
\ccRefIdfierPage{boost::graph_traits< CGAL::Polyhedron_3<Traits> const > }\\
\ccRefIdfierPage{boost::graph_traits< CGAL::Polyhedron_3<Traits> > }\\
\ccRefIdfierPage{boost::graph_traits< CGAL::Polyhedron_3<Traits> const> }\\
\ccRefIdfierPage{CGAL::geometric_graph_traits< CGAL::Polyhedron_3<Traits> > }\\
\ccRefIdfierPage{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> const > }\\
\ccRefIdfierPage{CGAL::halfedge_graph_traits< CGAL::Polyhedron_3<Traits> > }\\
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer

View File

@ -6,5 +6,12 @@
% +------------------------------------------------------------------------+
% alfabatisch
\input{BGL_ref/intro.tex}
\input{BGL_ref/ConnectedPlanarDirectedGeometricGraph.tex}
\input{BGL_ref/HalfedgeGraph.tex}
\input{BGL_ref/Polyhedron_graph_traits.tex}
\input{BGL_ref/Polyhedron_graph_traits_const.tex}
\input{BGL_ref/Polyhedron_geometric_graph_traits.tex}
\input{BGL_ref/Polyhedron_halfedge_graph_traits.tex}
\input{BGL_ref/Polyhedron_halfedge_graph_traits_const.tex}
%% EOF

View File

@ -335,24 +335,24 @@ public :
};
template <class HDS_>
struct HDS_undirected_graph_traits
struct HDS_halfedge_graph_traits
{
public :
typedef HDS_ HDS;
typedef HDS_all_undirected_edges_iterator<HDS> edge_iterator;
typedef HDS_all_undirected_edges_iterator<HDS> undirected_edge_iterator;
};
template <class HDS_>
struct HDS_undirected_graph_traits<HDS_ const>
struct HDS_halfedge_graph_traits<HDS_ const>
{
public :
typedef HDS_ HDS;
typedef HDS_all_undirected_edges_const_iterator<HDS> edge_iterator;
typedef HDS_all_undirected_edges_const_iterator<HDS> undirected_edge_iterator;
};

View File

@ -32,29 +32,31 @@
CGAL_BEGIN_NAMESPACE
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edges_size_type
num_undirected_edges(const Polyhedron_3<Gt,I,HDS,A>& p)
{
return p.size_of_halfedges() / 2 ;
}
//
// Const versions
//
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
struct undirected_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const >
: CGAL::HDS_undirected_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>
struct geometric_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const >
{
typedef CGAL::Polyhedron_3<Gt,I,HDS,A> const Polyhedron ;
typedef typename Polyhedron::Point_3 Point ;
};
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
struct halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const >
: CGAL::HDS_halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> const>
{};
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
inline std::pair<typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator
,typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator
inline std::pair<typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::undirected_edge_iterator
,typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::undirected_edge_iterator
>
undirected_edges( Polyhedron_3<Gt,I,HDS,A> const& p )
{
typedef typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edge_iterator Iter;
typedef typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::undirected_edge_iterator Iter;
return std::make_pair( Iter(p.edges_begin()), Iter(p.edges_end()) );
}
@ -105,42 +107,29 @@ next_edge_cw( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edg
return outedge->opposite()->next();
}
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor
out_edge( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
, Polyhedron_3<Gt,I,HDS,A> const&
)
{
HalfedgeDS_items_decorator< Polyhedron_3<Gt,I,HDS,A> > D ;
return D.get_vertex_edge(u)->opposite();
}
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::edge_descriptor
in_edge( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> const>::vertex_descriptor u
, Polyhedron_3<Gt,I,HDS,A> const&
)
{
HalfedgeDS_items_decorator< Polyhedron_3<Gt,I,HDS,A> > D ;
return D.get_vertex_edge(u);
}
//
// Non-Const versions
//
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
struct geometric_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
{
typedef CGAL::Polyhedron_3<Gt,I,HDS,A> Polyhedron ;
typedef typename Polyhedron::Point_3 Point ;
};
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
struct undirected_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
: CGAL::HDS_undirected_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
struct halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
: CGAL::HDS_halfedge_graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >
{};
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
inline std::pair<typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_iterator
,typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_iterator
inline std::pair<typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::undirected_edge_iterator
,typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::undirected_edge_iterator
>
undirected_edges( Polyhedron_3<Gt,I,HDS,A>& p )
{
typedef typename undirected_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_iterator Iter;
typedef typename halfedge_graph_traits< Polyhedron_3<Gt,I,HDS,A> >::undirected_edge_iterator Iter;
return std::make_pair( Iter(p.edges_begin()), Iter(p.edges_end()) );
}
@ -196,28 +185,6 @@ next_edge_cw( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_des
}
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
out_edge( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
, Polyhedron_3<Gt,I,HDS,A>&
)
{
HalfedgeDS_items_decorator< Polyhedron_3<Gt,I,HDS,A> > D ;
return D.get_vertex_edge(u)->opposite();
}
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
in_edge( typename boost::graph_traits< Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
, Polyhedron_3<Gt,I,HDS,A>&
)
{
HalfedgeDS_items_decorator< Polyhedron_3<Gt,I,HDS,A> > D ;
return D.get_vertex_edge(u);
}
CGAL_END_NAMESPACE
#undef CGAL_HDS_