Merge branch 'gsoc2019-pointmatcher_icp_wrapper-necipfazil' of github.com:necipfazil/cgal into gsoc2019-pointmatcher_icp_wrapper-necipfazil

This commit is contained in:
Necip Yildiran 2019-09-03 22:44:41 -04:00
commit 268b7dc82b
655 changed files with 235911 additions and 10654 deletions

3
.gitignore vendored
View File

@ -1206,3 +1206,6 @@ gmon.*
/Stream_support/test/Stream_support/cgal_test_with_cmake
/*.html
/Snap_rounding_2/test/Snap_rounding_2/data/out
Polygonal_surface_reconstruction/examples/build*
Polygonal_surface_reconstruction/test/build*
Solver_interface/examples/build*

View File

@ -34,24 +34,24 @@ env:
- PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
- PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 '
- PACKAGE='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
- PACKAGE='Polygon Polygon_mesh_processing Polyhedron '
- PACKAGE='Polyhedron_IO Polyline_simplification_2 Polynomial '
- PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
- PACKAGE='Profiling_tools Property_map QP_solver '
- PACKAGE='Random_numbers Ridges_3 STL_Extension '
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
- PACKAGE='Shape_detection Skin_surface_3 Snap_rounding_2 '
- PACKAGE='Solver_interface Spatial_searching Spatial_sorting '
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
- PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation '
- PACKAGE='Surface_mesh_deformation Surface_mesh_parameterization Surface_mesh_segmentation '
- PACKAGE='Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization '
- PACKAGE='Surface_mesher Surface_sweep_2 TDS_2 '
- PACKAGE='TDS_3 Testsuite Three '
- PACKAGE='Triangulation Triangulation_2 Triangulation_3 '
- PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 '
- PACKAGE='wininst '
- PACKAGE='Polygon Polygon_mesh_processing Polygonal_surface_reconstruction '
- PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 '
- PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis '
- PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map '
- PACKAGE='QP_solver Random_numbers Ridges_3 '
- PACKAGE='STL_Extension Scale_space_reconstruction_3 Scripts '
- PACKAGE='SearchStructures Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 '
- PACKAGE='Set_movable_separability_2 Shape_detection Skin_surface_3 '
- PACKAGE='Snap_rounding_2 Solver_interface Spatial_searching '
- PACKAGE='Spatial_sorting Straight_skeleton_2 Stream_lines_2 '
- PACKAGE='Stream_support Subdivision_method_3 Surface_mesh '
- PACKAGE='Surface_mesh_approximation Surface_mesh_deformation Surface_mesh_parameterization '
- PACKAGE='Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification '
- PACKAGE='Surface_mesh_skeletonization Surface_mesher Surface_sweep_2 '
- PACKAGE='TDS_2 TDS_3 Testsuite '
- PACKAGE='Three Triangulation Triangulation_2 '
- PACKAGE='Triangulation_3 Union_find Visibility_2 '
- PACKAGE='Voronoi_diagram_2 wininst '
compiler: clang
install:
- echo "$PWD"

View File

@ -84,6 +84,7 @@ Point_set_processing_3
Poisson_surface_reconstruction_3
Polygon
Polygon_mesh_processing
Polygonal_surface_reconstruction
Polyhedron
Polyhedron_IO
Polyline_simplification_2

View File

@ -23,7 +23,7 @@ MainWindow::MainWindow(QWidget* parent)
m_pViewer = ui->viewer;
// does not save the state of the viewer
m_pViewer->setStateFileName(QString::null);
m_pViewer->setStateFileName(QString());
// accepts drop events
setAcceptDrops(true);

View File

@ -126,6 +126,8 @@ Before the release 4.3 of \cgal, the return type of this function used to be `bo
*/
typedef unspecified_type Intersection;
/// @}
/// \name Distance Queries
/// The following predicates are required for each
/// type `Query` for which the class `CGAL::AABB_tree<AABBTraits>` may receive a

View File

@ -13,7 +13,5 @@ template< typename T >
class Fraction_traits {
public:
/// @}
}; /* end Fraction_traits */
} /* end namespace CGAL */

View File

@ -42,7 +42,5 @@ the smallest positive remainder \f$ r\f$.
class EuclideanRing {
public:
/// @}
}; /* end EuclideanRing */

View File

@ -26,7 +26,5 @@ This is also the case for the respective global functions.
class ExplicitInteroperable {
public:
/// @}
}; /* end ExplicitInteroperable */

View File

@ -28,7 +28,5 @@ Moreover, `CGAL::Algebraic_structure_traits< FieldWithRootOf >` is a model of `A
class FieldWithRootOf {
public:
/// @}
}; /* end FieldWithRootOf */

View File

@ -27,7 +27,5 @@ Moreover, `CGAL::Algebraic_structure_traits< FieldWithSqrt >` is a model of `Alg
class FieldWithSqrt {
public:
/// @}
}; /* end FieldWithSqrt */

View File

@ -16,7 +16,5 @@ denominator type are provided by `CGAL::Fraction_traits`.
class Fraction {
public:
/// @}
}; /* end Fraction */

View File

@ -28,7 +28,5 @@ is `CGAL::Tag_true`.
class ImplicitInteroperable {
public:
/// @}
}; /* end ImplicitInteroperable */

View File

@ -33,7 +33,5 @@ Moreover, `CGAL::Algebraic_structure_traits< IntegralDomain >` is a model of
class IntegralDomain {
public:
/// @}
}; /* end IntegralDomain */

View File

@ -32,7 +32,5 @@ for Homogeneous kernels.
class RingNumberType {
public:
/// @}
}; /* end RingNumberType */

View File

@ -40,7 +40,5 @@ derived from `CGAL::Unique_factorization_domain_tag`
class UniqueFactorizationDomain {
public:
/// @}
}; /* end UniqueFactorizationDomain */

View File

@ -1435,13 +1435,9 @@ compute_event_x_coordinates_with_event_indices() const {
CGAL_ACK_DEBUG_PRINT << " one curve event" << std::endl;
#endif
*/
#if CGAL_CXX11
// Fix a warning by using `emplace_back()` instead of
// copying a non-initialized `optional
this->ptr()->event_slices.emplace_back();
#else
this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1());
#endif
switch(*(one_curve_it++)) {
case(CGAL::internal::ROOT_OF_FIRST_SET): {
event_indices.push_back(Event_indices(-1,f_count,-1));
@ -1468,11 +1464,7 @@ compute_event_x_coordinates_with_event_indices() const {
CGAL_ACK_DEBUG_PRINT << " two curve event" << std::endl;
#endif
*/
#if CGAL_CXX11
this->ptr()->event_slices.emplace_back();
#else
this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1());
#endif
event_indices.push_back
(Event_indices(inter_count,-1,-1));
@ -1486,12 +1478,7 @@ compute_event_x_coordinates_with_event_indices() const {
<< std::endl;
#endif
*/
#if CGAL_CXX11
this->ptr()->event_slices.emplace_back();
#else
this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1());
#endif
switch(*(one_curve_it++)) {
case(CGAL::internal::ROOT_OF_FIRST_SET): {

View File

@ -283,9 +283,6 @@ public:
protected:
//!\name private members
//!@{
Algebraic_kernel_with_analysis_2* _m_kernel;
@ -309,6 +306,7 @@ public:
//! specified key was found
typedef typename Base::Find_result Find_result;
//!@}
//!\name constructors and access functions
//!@{
@ -342,6 +340,8 @@ public:
}
return (p.first)->second;
}
//!@}
}; // class LRU_hashed_map_with_kernel

View File

@ -678,8 +678,6 @@ public:
return static_cast<std::size_t>(x.id());
}
//!@}
}; // class Xy_coordinate_2
template < class AlgebraicCurveKernel_2, class Rep>

View File

@ -160,7 +160,7 @@ struct Solve_1{
template <class OutputIterator>
OutputIterator operator()(const Polynomial_1 &p,
bool known_to_be_square_free,
bool,
OutputIterator res)const{
Isolator isol(p);
for(int l=0;l<isol.number_of_real_roots();++l)

View File

@ -182,7 +182,7 @@ struct Solve_z_1{
template <class OutputIterator>
OutputIterator operator()(const Polynomial_1 &p,
bool known_to_be_square_free,
bool,
OutputIterator res)const{
ZPolynomial_1 zp=PolConverter()(p);
Isolator isol(zp);

View File

@ -56,7 +56,7 @@ class RS23_k_isolator_1{
template <class Polynomial_,class Bound_>
RS23_k_isolator_1<Polynomial_,Bound_>::
RS23_k_isolator_1(const Polynomial_ &p){
RS23_k_isolator_1(const Polynomial_ &){
CGAL_error_msg("not implemented for these polynomial/bound types");
}

View File

@ -51,7 +51,7 @@ class RS2_isolator_1{
template <class Polynomial_,class Bound_>
RS2_isolator_1<Polynomial_,Bound_>::
RS2_isolator_1(const Polynomial_ &p){
RS2_isolator_1(const Polynomial_ &){
CGAL_error_msg("not implemented for these polynomial/bound types");
}

View File

@ -26,7 +26,5 @@ template< typename Traits, typename Fb, typename ExactAlphaComparisonTag >
class Alpha_shape_face_base_2 : public Fb {
public:
/// @}
}; /* end Alpha_shape_face_base_2 */
} /* end namespace CGAL */

View File

@ -27,7 +27,5 @@ template< typename Traits, typename Vb, typename ExactAlphaComparisonTag >
class Alpha_shape_vertex_base_2 : public Vb {
public:
/// @}
}; /* end Alpha_shape_vertex_base_2 */
} /* end namespace CGAL */

View File

@ -319,7 +319,7 @@ public:
return n;
}
private :
protected :
//--------------------- INITIALIZATION OF PRIVATE MEMBERS -----------

View File

@ -51,24 +51,24 @@ void Viewer::compile_shaders()
"varying highp vec4 fP; \n"
"varying highp vec3 fN; \n"
"uniform highp vec4 color; \n"
"uniform vec4 light_pos; \n"
"uniform vec4 light_diff; \n"
"uniform vec4 light_spec; \n"
"uniform vec4 light_amb; \n"
"uniform highp vec4 light_pos; \n"
"uniform highp vec4 light_diff; \n"
"uniform highp vec4 light_spec; \n"
"uniform highp vec4 light_amb; \n"
"uniform float spec_power ; \n"
"void main(void) { \n"
" vec3 L = light_pos.xyz - fP.xyz; \n"
" vec3 V = -fP.xyz; \n"
" highp vec3 L = light_pos.xyz - fP.xyz; \n"
" highp vec3 V = -fP.xyz; \n"
" vec3 N = normalize(fN); \n"
" highp vec3 N = normalize(fN); \n"
" L = normalize(L); \n"
" V = normalize(V); \n"
" vec3 R = reflect(-L, N); \n"
" vec4 diffuse = abs(dot(N,L)) * light_diff * color; \n"
" vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
" highp vec3 R = reflect(-L, N); \n"
" highp vec4 diffuse = abs(dot(N,L)) * light_diff * color; \n"
" highp vec4 specular = pow(max(dot(R,V), 0.0), spec_power) * light_spec; \n"
"gl_FragColor = light_amb*color + diffuse + specular ; \n"
"} \n"

View File

@ -477,7 +477,7 @@ Defined in `CGAL/IO/io.h`
\pre The insert operator must be defined for `Point`.
\relates Alpha_shape_3
*/
ostream& operator<<(std::ostream& os,
std::ostream& operator<<(std::ostream& os,
const Alpha_shape_3<Dt,ExactAlphaComparisonTag>& A);
/*!

View File

@ -29,8 +29,6 @@ template< typename Traits, typename Cb, typename ExactAlphaComparisonTag, typena
class Alpha_shape_cell_base_3 : public Cb {
public:
/// @}
}; /* end Alpha_shape_cell_base_3 */
} /* end namespace CGAL */
@ -109,28 +107,28 @@ void set_alpha_max(NT alpha);
/// @{
/*!
Returns true for Gabriel faces.
returns `true` for Gabriel faces.
*/
bool is_Gabriel() const ;
/*!
Returns true for convex hull faces.
returns `true` for convex hull faces.
*/
bool is_on_chull() const;
/*!
Returns the `alpha_min`.
\pre `is_Gabriel()` returns false;
returns the `alpha_min`.
\pre `is_Gabriel()` returns `false`.
*/
NT alpha_min() const;
/*!
Returns the `alpha_mid`.
returns `alpha_mid`.
*/
NT alpha_mid() const;
/*!
Returns `alpha_max`.
returns `alpha_max`.
\pre `is_on_chull()` returns `false`.
*/
NT alpha_max() const;

View File

@ -29,7 +29,6 @@ template< typename Traits, typename Vb, typename ExactAlphaComparisonTag, typena
class Alpha_shape_vertex_base_3 : public Vb {
public:
/// @}
}; /* end Alpha_shape_vertex_base_3 */
} /* end namespace CGAL */

View File

@ -55,11 +55,11 @@ Enum to classify the simplices of the underlying
triangulation with respect to a given alpha value.
Each k-dimensional simplex of the triangulation
can be classified as EXTERIOR, SINGULAR, REGULAR
or INTERIOR.
A \f$ k\f$ simplex is REGULAR if it is on the boundary
can be classified as `EXTERIOR`, `SINGULAR`, `REGULAR`
or `INTERIOR`.
A \f$ k\f$ simplex is `REGULAR` if it is on the boundary
of the alpha complex and belongs to a \f$ k+1\f$ simplex in this complex
and it is SINGULAR if it is a boundary simplex that is not included in a \f$ k+1\f$ simplex of the complex.
and it is `SINGULAR` if it is a boundary simplex that is not included in a \f$ k+1\f$ simplex of the complex.
*/
enum Classification_type {EXTERIOR, SINGULAR, REGULAR, INTERIOR};
@ -70,19 +70,19 @@ enum Classification_type {EXTERIOR, SINGULAR, REGULAR, INTERIOR};
/// @{
/*!
Introduces an empty fixed alpha shape and sets the alpha value to `alpha`.
builds an empty fixed alpha shape and sets the alpha value to `alpha`.
*/
Fixed_alpha_shape_3(FT alpha = 0);
/*!
Builds a fixed alpha shape from the triangulation `dt`,
builds a fixed alpha shape from the triangulation `dt`,
and sets the alpha value to `alpha`.
\attention This operation destroys the triangulation.
\attention This operation swaps `*this` and `dt`, that is `dt` is an empty triangulation once the fixed alpha shape is built.
*/
Fixed_alpha_shape_3(Dt& dt,FT alpha = 0);
/*!
Builds a fixed alpha shape for the points in the range
builds a fixed alpha shape for the points in the range
`[first,last)` and sets the alpha value to `alpha`.
\tparam InputIterator must be an input iterator with value type `Point` (the type point of the underlying triangulation.)
*/
@ -99,7 +99,7 @@ const FT& alpha = 0);
/*!
Inserts the point p in the underlying triangulation and returns the corresponding vertex.
inserts the point `p` in the underlying triangulation and returns the corresponding vertex.
The optional argument `start` is used as a starting place for the search.
The classification types of the new simplices are computed and that of the simplices incident
to the new ones are updated.
@ -109,14 +109,14 @@ Vertex_handle insert (Point p,Cell_handle start = Cell_handle());
/*!
Removes the vertex v from the underlying triangulation.
removes the vertex `v` from the underlying triangulation.
The classification types of new simplices and their incident faces are set or reset.
*/
void remove (Vertex_handle v);
/*!
Clears the structure.
clears the structure.
*/
void
clear();
@ -127,40 +127,40 @@ clear();
/// @{
/*!
Returns the \f$ \alpha\f$-value.
returns the \f$ \alpha\f$-value.
*/
const FT&
get_alpha(void) const;
/*!
Classifies the cell `c` of the underlying triangulation in the alpha complex.
classifies the cell `c` of the underlying triangulation in the alpha complex.
*/
Classification_type
classify(Cell_handle c) const;
/*!
Classifies the facet `f` of the underlying triangulation in the alpha complex.
classifies the facet `f` of the underlying triangulation in the alpha complex.
*/
Classification_type classify(Facet f) const;
/*!
Classifies the facet of the cell `f` opposite to the vertex with index
classifies the facet of the cell `f` opposite to the vertex with index
`i` of the underlying triangulation in the alpha complex.
*/
Classification_type classify(Cell_handle f, int i) const;
/*!
Classifies the edge `e` of the underlying triangulation in the alpha complex.
classifies the edge `e` of the underlying triangulation in the alpha complex.
*/
Classification_type classify(const Edge& e) const;
/*!
Classifies the vertex `v` of the underlying triangulation in the alpha complex.
classifies the vertex `v` of the underlying triangulation in the alpha complex.
*/
Classification_type classify(Vertex_handle v) const;
/*!
Writes the cells which are of type `type` in the alpha complex
writes the cells which are of type `type` in the alpha complex
to the sequence
pointed to by the output iterator `it`. Returns past the end
of the output sequence.
@ -169,7 +169,7 @@ template<class OutputIterator>
OutputIterator get_alpha_shape_cells(OutputIterator it, Classification_type type);
/*!
Writes the facets which are of type `type` in the alpha complex
writes the facets which are of type `type` in the alpha complex
to the sequence pointed to by the output iterator `it`. Returns past the end
of the output sequence.
*/
@ -177,7 +177,7 @@ template<class OutputIterator>
OutputIterator get_alpha_shape_facets(OutputIterator it, Classification_type type);
/*!
Writes the edges which are of type `type` in the alpha complex
writes the edges which are of type `type` in the alpha complex
to the sequence
pointed to by the output iterator `it`. Returns past the end
of the output sequence.
@ -186,7 +186,7 @@ template<class OutputIterator>
OutputIterator get_alpha_shape_edges(OutputIterator it, Classification_type type);
/*!
Writes the vertices which are of type `type` in the alpha complex
writes the vertices which are of type `type` in the alpha complex
to the sequence pointed to by the output iterator `it`. Returns past the end
of the output sequence.
*/
@ -198,13 +198,13 @@ OutputIterator get_alpha_shape_vertices(OutputIterator it, Classification_type t
}; /* end Fixed_alpha_shape_3 */
/*!
Inserts the fixed alpha shape `A` into the stream `os`.
inserts the fixed alpha shape `A` into the stream `os`.
An overlaoad of `operator<<` must be available for `GT::Point`.
\relates Fixed_alpha_shape_3
*/
ostream& operator<<(ostream& os, const Fixed_alpha_shape_3<Dt>& A);
std::ostream& operator<<(std::ostream& os, const Fixed_alpha_shape_3<Dt>& A);
} /* end namespace CGAL */

View File

@ -24,7 +24,5 @@ template< typename Traits, typename Cb >
class Fixed_alpha_shape_cell_base_3 : public Cb {
public:
/// @}
}; /* end Fixed_alpha_shape_cell_base_3 */
} /* end namespace CGAL */

View File

@ -24,7 +24,5 @@ template< typename Traits, typename Vb >
class Fixed_alpha_shape_vertex_base_3 : public Vb {
public:
/// @}
}; /* end Fixed_alpha_shape_vertex_base_3 */
} /* end namespace CGAL */

View File

@ -414,6 +414,7 @@ public:
return Intersect_2();
}
//@}
};
} //namespace CGAL

View File

@ -79,7 +79,7 @@ for an illustration of the various \sc{Dcel} features. For more details
on the \sc{Dcel} data structure see \cgalCite{bkos-cgaa-00} Chapter 2.
\cgalFigureBegin{arr_figseg_dcel,arr_segs.png}
An arrangement of interior-disjoint line segments with some of the \sc{Dcel} records that represent it. The unbounded face \f$ f_0\f$ has a single connected component that forms a hole inside it, and this hole is comprised if several faces. The half-edge \f$ e\f$ is directed from its source vertex \f$ v_1\f$ to its target vertex \f$ v_2\f$. This edge, together with its twin \f$ e'\f$, correspond to a line segment that connects the points associated with \f$ v_1\f$ and \f$ v_2\f$ and separates the face \f$ f_1\f$ from \f$ f_2\f$. The predecessor \f$ e_{\rm prev}\f$ and successor \f$ e_{\rm next}\f$ of \f$ e\f$ are part of the chain that form the outer boundary of the face \f$ f_2\f$. The face \f$ f_1\f$ has a more complicated structure as it contains two holes in its interior: One hole consists of two adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole is comprised of two edges. \f$ f_1\f$ also contains two isolated vertices \f$ u_1\f$ and \f$ u_2\f$ in its interior.
An arrangement of interior-disjoint line segments with some of the \sc{Dcel} records that represent it. The unbounded face \f$ f_0\f$ has a single connected component that forms a hole inside it, and this hole is comprised of several faces. The half-edge \f$ e\f$ is directed from its source vertex \f$ v_1\f$ to its target vertex \f$ v_2\f$. This edge, together with its twin \f$ e'\f$, correspond to a line segment that connects the points associated with \f$ v_1\f$ and \f$ v_2\f$ and separates the face \f$ f_1\f$ from \f$ f_2\f$. The predecessor \f$ e_{\rm prev}\f$ and successor \f$ e_{\rm next}\f$ of \f$ e\f$ are part of the chain that form the outer boundary of the face \f$ f_2\f$. The face \f$ f_1\f$ has a more complicated structure as it contains two holes in its interior: One hole consists of two adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole is comprised of two edges. \f$ f_1\f$ also contains two isolated vertices \f$ u_1\f$ and \f$ u_2\f$ in its interior.
\cgalFigureEnd
The \f$ x\f$-monotone curves of an arrangement are embedded in an
@ -559,8 +559,8 @@ The arrangement of the line segments \f$ s_1, \ldots, s_5\f$ constructed in `edg
The following program demonstrates the usage of the four insertion
functions. It creates an arrangement of five line segments, as
depicted in \cgalFigureRef{arr_figex_1}.\cgalFootnote{Notice that in all figures in the rest of this chapter the coordinate axes are drawn only for illustrative purposes and are <I>not</I> part of the arrangement.} As the arrangement is very
simple, we use the simple Cartesian kernel of \cgal with integer
depicted in \cgalFigureRef{arr_figex_2} \cgalFootnote{Notice that in all figures in the rest of this chapter the coordinate axes are drawn only for illustrative purposes and are <I>not</I> part of the arrangement.}. As the arrangement is very
simple, we use the simple %Cartesian kernel of \cgal with integer
coordinates for the segment endpoints. We also use the
`Arr_segment_traits_2` class that enables the efficient
maintenance of arrangements of line segments; see more details on
@ -668,7 +668,7 @@ In case the <span class="textsc">Gmp</span> library is not installed (as indicat
the `CGAL_USE_GMP` flag defined in `CGAL/basic.h`), we
use `MP_Float`, a number-type included in \cgal's support
library that is capable of storing floating-point numbers with
unbounded mantissa. We also use the standard Cartesian
unbounded mantissa. We also use the standard %Cartesian
kernel of \cgal as our kernel. This is recommended when the
kernel is instantiated with a more complex number type, as we
demonstrate in other examples in this chapter.
@ -1439,7 +1439,7 @@ of the edge, it is removed as well.
\image latex h_shape.png
The following example demonstrates the usage of the free removal
functions. In creates an arrangement of four line segment forming
functions. It creates an arrangement of four line segment forming
an H-shape with a double horizontal line. Then it removes the two
horizontal edges and clears all redundant vertices, such that the
final arrangement consists of just two edges associated with the
@ -2668,7 +2668,7 @@ of arbitrary degree (in general, a sequence of \f$ n+1\f$ control points define
B&eacute;zier curve of degree \f$ n\f$). The template parameters are the same ones
used by the `Arr_conic_traits_2` class template, and here it is also
recommended to use the `CORE_algebraic_number_traits` class, with
Cartesian kernels instantiated with the `Rational` and `Algebraic`
%Cartesian kernels instantiated with the `Rational` and `Algebraic`
number-types defined by this class.
As mentioned above, we assume that the coordinates of all control

View File

@ -110,7 +110,7 @@ points. The value-type of `InputIterator` is `RatKernel::Point_2`.
template <class InputIterator>
Curve_2 (InputIterator pts_begin, InputIterator pts_end);
/// @}
/// @}
/// \name Access Functions
/// @{
@ -282,7 +282,7 @@ std::pair<double, double> parameter_range () const;
}; /* end Arr_Bezier_curve_traits_2::X_monotone_curve_2 */
Class Trim_2{
class Trim_2{
public:
/// \name Creation
/// @{
@ -295,6 +295,9 @@ Trims the given x-monotone curve to an from src to tgt.
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt)const
/// @}
}/* end Arr_Bezier_curve_traits_2::Trim_2 */
}; /* end Arr_Bezier_curve_traits_2 */

View File

@ -354,7 +354,7 @@ Bbox_2 bbox() const;
}; /* end Arr_circle_segment_traits_2::X_monotone_curve_2 */
Class Trim_2{
class Trim_2{
public:
/// \name Creation
/// @{
@ -367,6 +367,7 @@ Trims the given x-monotone curve to an from src to tgt.
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt)const
/// @}
}/* end Arr_circle_segment_traits_2::Trim_2 */
}; /* end Arr_circle_segment_traits_2 */

View File

@ -15,7 +15,5 @@ template< typename CircularKernel >
class Arr_circular_arc_traits_2 {
public:
/// @}
}; /* end Arr_circular_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -19,7 +19,5 @@ template< typename CircularKernel >
class Arr_circular_line_arc_traits_2 {
public:
/// @}
}; /* end Arr_circular_line_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -385,7 +385,7 @@ const Point_2& right() const;
}; /* end Arr_conic_traits_2::X_monotone_curve_2 */
Class Trim_2{
class Trim_2{
public:
/// \name Creation
/// @{
@ -398,6 +398,9 @@ Trims the given x-monotone curve to an from src to tgt.
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt)const
/// @}
}/* end Arr_conic_traits_2::Trim_2 */

View File

@ -19,8 +19,6 @@ template< typename Arrangement >
class Arr_default_overlay_traits {
public:
/// @}
}; /* end Arr_default_overlay_traits */
} /* end namespace CGAL */
@ -55,7 +53,5 @@ template< typename Arr_A, typename Arr_B, typename Arr_R, typename OvlFaceData >
class Arr_face_overlay_traits {
public:
/// @}
}; /* end Arr_face_overlay_traits */
} /* end namespace CGAL */

View File

@ -60,7 +60,5 @@ template< typename Arrangement, typename Generator >
class Arr_landmarks_point_location {
public:
/// @}
}; /* end Arr_landmarks_point_location */
} /* end namespace CGAL */

View File

@ -15,7 +15,5 @@ template< typename CircularKernel >
class Arr_line_arc_traits_2 {
public:
/// @}
}; /* end Arr_line_arc_traits_2 */
} /* end namespace CGAL */

View File

@ -145,7 +145,7 @@ public:
}; /* end Arr_linear_traits_2::Curve_2 */
Class Trim_2{
class Trim_2{
public:
/// \name Creation
/// @{
@ -158,6 +158,7 @@ Trims the given x-monotone curve to an from src to tgt.
X_monotone_curve_2(const X_monotone_curve_2& xcv,
const Point_2& src,
const Point_2& tgt)const
/// @}
}/* end Arr_linear_traits_2::Trim_2 */
}; /* end Arr_linear_traits_2 */

View File

@ -26,7 +26,5 @@ template< typename Arrangement >
class Arr_naive_point_location {
public:
/// @}
}; /* end Arr_naive_point_location */
} /* end namespace CGAL */

View File

@ -28,7 +28,5 @@ template< typename Kernel >
class Arr_non_caching_segment_basic_traits_2 {
public:
/// @}
}; /* end Arr_non_caching_segment_basic_traits_2 */
} /* end namespace CGAL */

View File

@ -45,7 +45,5 @@ class Arr_non_caching_segment_traits_2
{
public:
/// @}
}; /* end Arr_non_caching_segment_traits_2 */
} /* end namespace CGAL */

View File

@ -64,8 +64,6 @@ template< typename Kernel >
class Arr_segment_traits_2 {
public:
/// @}
Class Trim_2{
public:
/// \name Creation

View File

@ -18,8 +18,6 @@ arrangement.
struct Arr_oblivious_side_tag {
/// @}
}; /* end Arr_oblivious_side_tag */
} /* end namespace CGAL */
@ -45,7 +43,5 @@ functions based on type of curves that induce the arrangement.
struct Arr_open_side_tag {
/// @}
}; /* end Arr_open_side_tag */
} /* end namespace CGAL */

View File

@ -36,7 +36,5 @@ template< typename Arrangement >
class Arr_walk_along_line_point_location {
public:
/// @}
}; /* end Arr_walk_along_line_point_location */
} /* end namespace CGAL */

View File

@ -30,8 +30,6 @@ template< typename Arrangement >
class Arr_extended_dcel_text_formatter {
public:
/// @}
}; /* end Arr_extended_dcel_text_formatter */
} /* end namespace CGAL */
@ -64,8 +62,6 @@ template< typename Arrangement >
class Arr_face_extended_text_formatter {
public:
/// @}
}; /* end Arr_face_extended_text_formatter */
} /* end namespace CGAL */
@ -96,7 +92,5 @@ template< typename Arrangement >
class Arr_text_formatter {
public:
/// @}
}; /* end Arr_text_formatter */
} /* end namespace CGAL */

View File

@ -26,7 +26,5 @@ template< typename ArrFormatter >
class Arr_with_history_text_formatter {
public:
/// @}
}; /* end Arr_with_history_text_formatter */
} /* end namespace CGAL */

View File

@ -15,8 +15,6 @@ represents a general planar curve.
class Curve_2 {
public:
/// @}
}; /* end ArrTraits::Curve_2 */
}

View File

@ -16,8 +16,6 @@ Represents a point in the plane.
class Point_2 {
public:
/// @}
}; /* end ArrTraits::Point_2 */
}

View File

@ -16,8 +16,6 @@ Represents a planar (weakly) \f$ x\f$-monotone curve.
class XMonotoneCurve_2 {
public:
/// @}
}; /* end ArrTraits::XMonotoneCurve_2 */
}

View File

@ -40,7 +40,7 @@ public:
* models the concept `ArrTraits::Approximate_2`.
*/
typedef unspecified_type Approximate_2;
/// @}
/// \name Accessing Functor Objects
/// @{

View File

@ -161,7 +161,7 @@ inside the face `f1`.
void create_edge (Face_handle_A f1,
Halfedge_handle_B e2,
Halfedge_handle_R e) const;
/// @}
/// \name Face Creation
/// The following function is invoked whenever a new face is
/// created. It is guaranteed that all halfedges along the face

View File

@ -751,6 +751,9 @@ public:
/*! Obtain a Trim_2 functor object. */
Trim_2 trim_2_object() const { return Trim_2(*this); }
// @}
};
} //namespace CGAL

View File

@ -908,7 +908,6 @@ protected:
typedef In_place_list<Inner_ccb, false> Inner_ccb_list;
typedef In_place_list<Isolated_vertex, false> Iso_vert_list;
#ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator;
@ -916,32 +915,6 @@ protected:
typedef typename Allocator_traits::template rebind_alloc<Outer_ccb> Outer_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Inner_ccb> Inner_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Isolated_vertex> Iso_vert_allocator;
#else // not CGAL_CXX11
// Vertex allocator.
typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator;
// Halfedge allocator.
typedef typename Allocator::template rebind<Halfedge> Halfedge_alloc_rebind;
typedef typename Halfedge_alloc_rebind::other Halfedge_allocator;
// Face allocator.
typedef typename Allocator::template rebind<Face> Face_alloc_rebind;
typedef typename Face_alloc_rebind::other Face_allocator;
// Outer CCB allocator.
typedef typename Allocator::template rebind<Outer_ccb> Out_ccb_alloc_rebind;
typedef typename Out_ccb_alloc_rebind::other Outer_ccb_allocator;
// Inner CCB allocator.
typedef typename Allocator::template rebind<Inner_ccb> In_ccb_alloc_rebind;
typedef typename In_ccb_alloc_rebind::other Inner_ccb_allocator;
// Isolated vertex allocator.
typedef typename Allocator::template rebind<Isolated_vertex>
Iso_vert_alloc_rebind;
typedef typename Iso_vert_alloc_rebind::other Iso_vert_allocator;
#endif // not CGAL_CXX11
public:
typedef typename Halfedge_list::size_type Size;
@ -1089,11 +1062,7 @@ public:
Vertex* new_vertex()
{
Vertex* v = vertex_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v);
#else
vertex_alloc.construct(v, Vertex());
#endif
vertices.push_back(*v);
return v;
}
@ -1116,11 +1085,7 @@ public:
Face* new_face()
{
Face* f = face_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Face_allocator>::construct(face_alloc, f);
#else
face_alloc.construct(f, Face());
#endif
faces.push_back (*f);
return(f);
}
@ -1129,11 +1094,7 @@ public:
Outer_ccb* new_outer_ccb()
{
Outer_ccb* oc = out_ccb_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc);
#else
out_ccb_alloc.construct(oc, Outer_ccb());
#endif
out_ccbs.push_back(*oc);
return (oc);
}
@ -1142,11 +1103,7 @@ public:
Inner_ccb* new_inner_ccb()
{
Inner_ccb* ic = in_ccb_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic);
#else
in_ccb_alloc.construct(ic, Inner_ccb());
#endif
in_ccbs.push_back(*ic);
return (ic);
}
@ -1155,11 +1112,7 @@ public:
Isolated_vertex* new_isolated_vertex()
{
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Iso_vert_allocator>::construct(iso_vert_alloc, iv);
#else
iso_vert_alloc.construct(iv, Isolated_vertex());
#endif
iso_verts.push_back(*iv);
return (iv);
}
@ -1171,11 +1124,7 @@ public:
void delete_vertex(Vertex* v)
{
vertices.erase(v);
#ifdef CGAL_CXX11
std::allocator_traits<Vertex_allocator>::destroy(vertex_alloc, v);
#else
vertex_alloc.destroy(v);
#endif
vertex_alloc.deallocate(v,1);
}
@ -1191,11 +1140,7 @@ public:
void delete_face(Face* f)
{
faces.erase(f);
#ifdef CGAL_CXX11
std::allocator_traits<Face_allocator>::destroy(face_alloc, f);
#else
face_alloc.destroy(f);
#endif
face_alloc.deallocate(f, 1);
}
@ -1203,11 +1148,7 @@ public:
void delete_outer_ccb(Outer_ccb* oc)
{
out_ccbs.erase(oc);
#ifdef CGAL_CXX11
std::allocator_traits<Outer_ccb_allocator>::destroy(out_ccb_alloc, oc);
#else
out_ccb_alloc.destroy(oc);
#endif
out_ccb_alloc.deallocate(oc, 1);
}
@ -1215,11 +1156,7 @@ public:
void delete_inner_ccb(Inner_ccb* ic)
{
in_ccbs.erase(ic);
#ifdef CGAL_CXX11
std::allocator_traits<Inner_ccb_allocator>::destroy(in_ccb_alloc, ic);
#else
in_ccb_alloc.destroy(ic);
#endif
in_ccb_alloc.deallocate(ic, 1);
}
@ -1227,11 +1164,7 @@ public:
void delete_isolated_vertex(Isolated_vertex* iv)
{
iso_verts.erase(iv);
#ifdef CGAL_CXX11
std::allocator_traits<Iso_vert_allocator>::destroy(iso_vert_alloc, iv);
#else
iso_vert_alloc.destroy(iv);
#endif
iso_vert_alloc.deallocate(iv, 1);
}
@ -1492,11 +1425,7 @@ protected:
Halfedge* _new_halfedge()
{
Halfedge* h = halfedge_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Halfedge_allocator>::construct(halfedge_alloc, h);
#else
halfedge_alloc.construct(h, Halfedge());
#endif
halfedges.push_back(*h);
return (h);
}
@ -1505,11 +1434,7 @@ protected:
void _delete_halfedge(Halfedge* h)
{
halfedges.erase(h);
#ifdef CGAL_CXX11
std::allocator_traits<Halfedge_allocator>::destroy(halfedge_alloc,h);
#else
halfedge_alloc.destroy(h);
#endif
halfedge_alloc.deallocate(h, 1);
}
};

View File

@ -86,6 +86,8 @@ public:
typedef
typename Intersection_list::const_iterator Intersection_iter;
//@}
private:
typedef std::map<Curve_id,

View File

@ -136,7 +136,6 @@ public:
{}
/// \name Types and functors defined here.
//@{
/* Functor to augment a polyline by either adding a vertex or a segment
* at the back.

View File

@ -984,8 +984,6 @@ public:
return Merge_2(this);
}
//@}
/// \name Functor definitions to handle boundaries
//@{

View File

@ -96,6 +96,8 @@ public:
*/
virtual void before_handle_event(Event* event);
//@}
/*! A notification invoked when a new subcurve is created. */
virtual void add_subcurve(Halfedge_handle he, Subcurve* sc);

View File

@ -372,6 +372,8 @@ public:
}
}
// @}
protected:
/*! Locate the arrangement feature containing the given point in the
* unbounded face(s).

View File

@ -113,11 +113,7 @@ assign(const Self& arr)
dup_c = m_curves_alloc.allocate (1);
p_cv = &(*ocit);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, dup_c, *p_cv);
#else
m_curves_alloc.construct(dup_c, *p_cv);
#endif
m_curves.push_back (*dup_c);
// Assign a map entry.
@ -185,11 +181,7 @@ void Arrangement_on_surface_with_history_2<GeomTr,TopTr>::clear ()
++cit;
m_curves.erase (p_cv);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::destroy(m_curves_alloc,p_cv);
#else
m_curves_alloc.destroy (p_cv);
#endif
m_curves_alloc.deallocate (p_cv, 1);
}
m_curves.destroy();

View File

@ -131,12 +131,8 @@ public:
// and store it in the curves' list.
typename Arrangement_with_history_2::Curve_halfedges *p_cv =
p_arr->m_curves_alloc.allocate (1);
#ifdef CGAL_CXX11
typedef decltype(p_arr->m_curves_alloc) M_Curves_alloc;
std::allocator_traits<M_Curves_alloc>::construct(p_arr->m_curves_alloc, p_cv, cv);
#else
p_arr->m_curves_alloc.construct (p_cv, cv);
#endif
p_arr->m_curves.push_back (*p_cv);
// Return a handle to the inserted curve (the last in the list).
@ -159,7 +155,10 @@ public:
he->curve().data().insert (&cv);
return;
}
}
//@}
};
} //namespace CGAL

View File

@ -1556,11 +1556,7 @@ protected:
Point_2*_new_point(const Point_2& pt)
{
Point_2* p_pt = m_points_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Points_alloc>::construct(m_points_alloc, p_pt, pt);
#else
m_points_alloc.construct(p_pt, pt);
#endif
return (p_pt);
}
@ -1568,11 +1564,7 @@ protected:
void _delete_point(Point_2& pt)
{
Point_2* p_pt = &pt;
#ifdef CGAL_CXX11
std::allocator_traits<Points_alloc>::destroy(m_points_alloc, p_pt);
#else
m_points_alloc.destroy(p_pt);
#endif
m_points_alloc.deallocate(p_pt, 1);
}
@ -1580,11 +1572,7 @@ protected:
X_monotone_curve_2* _new_curve(const X_monotone_curve_2& cv)
{
X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, cv);
#else
m_curves_alloc.construct(p_cv, cv);
#endif
return (p_cv);
}
@ -1592,11 +1580,7 @@ protected:
void _delete_curve(X_monotone_curve_2& cv)
{
X_monotone_curve_2* p_cv = &cv;
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::destroy(m_curves_alloc, p_cv);
#else
m_curves_alloc.destroy(p_cv);
#endif
m_curves_alloc.deallocate(p_cv, 1);
}
//@}

View File

@ -588,6 +588,7 @@ public:
* \return true iff e1 and e2 are mergeable.
*/
bool are_mergeable (Halfedge_const_handle e1, Halfedge_const_handle e2) const;
//@}
protected:
@ -623,11 +624,7 @@ protected:
// Allocate an extended curve (with an initially empty set of edges)
// and store it in the curves' list.
Curve_halfedges *p_cv = m_curves_alloc.allocate (1);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, cv);
#else
m_curves_alloc.construct (p_cv, cv);
#endif
m_curves.push_back (*p_cv);
// Create a data-traits Curve_2 object, which is comprised of cv and
@ -656,11 +653,7 @@ protected:
// and store it in the curves' list.
Curve_halfedges *p_cv = m_curves_alloc.allocate (1);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, cv);
#else
m_curves_alloc.construct (p_cv, cv);
#endif
m_curves.push_back (*p_cv);
// Create a data-traits Curve_2 object, which is comprised of cv and
@ -691,11 +684,7 @@ protected:
while (begin != end) {
Curve_halfedges *p_cv = m_curves_alloc.allocate (1);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, *begin);
#else
m_curves_alloc.construct (p_cv, *begin);
#endif
m_curves.push_back (*p_cv);
data_curves.push_back (Data_curve_2 (*begin, p_cv));
@ -744,11 +733,7 @@ protected:
// Remove the extended curve object from the list and de-allocate it.
m_curves.erase (p_cv);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::destroy(m_curves_alloc, p_cv);
#else
m_curves_alloc.destroy (p_cv);
#endif
m_curves_alloc.deallocate (p_cv, 1);
return (n_removed);
@ -811,11 +796,7 @@ public:
p_cv = &(*ocit1);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, dup_c, *p_cv);
#else
m_curves_alloc.construct (dup_c, *p_cv);
#endif
m_curves.push_back (*dup_c);
// Assign a map entry.
@ -830,11 +811,7 @@ public:
dup_c = m_curves_alloc.allocate (1);
p_cv = &(*ocit2);
#ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, dup_c, *p_cv);
#else
m_curves_alloc.construct (dup_c, *p_cv);
#endif
m_curves.push_back (*dup_c);
// Assign a map entry.

View File

@ -1588,6 +1588,8 @@ public:
return false;
}
//!@}
protected:
//!\name Trimming
//!@{
@ -3152,7 +3154,7 @@ public:
return *(this->ptr()->_m_bbox);
}
//!}
//!@}
public:

View File

@ -458,6 +458,8 @@ public:
Arc_2 arc(x, c);
return arc;
}
//!@}
};
/*!\brief
@ -2668,7 +2670,7 @@ public:
//! this instance's first template parameter
typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
//!@}
// typedef Curved_kernel_via_analysis_2_functors<
// CurvedKernelViaAnalysis_2 > Functor_base;

View File

@ -712,7 +712,9 @@ public:
//! type of curve analysis
typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2;
//!@}
public:
//!\name embedded types for \c Arrangement_2 package
//!@{

View File

@ -242,6 +242,8 @@ public:
}
};
//!@}
public:
//!\name Standard constructors
//!@{
@ -610,7 +612,7 @@ public:
return *(this->ptr()->_m_doubles);
}
//!}
//!@}
public:
@ -783,8 +785,7 @@ public:
*this = Point_2< Curved_kernel_via_analysis_2, Rep >(rep);
}
//!@}
//! @}
// friends ////////////////////////////////////////////////////////////////
//! befriending arc classes

View File

@ -487,6 +487,8 @@ public:
Base(rep) {
}
//!@}
Algebraic_real_1 x() const {
return Algebraic_real_1();
}
@ -1019,6 +1021,8 @@ public:
//! type of Coordinate_2
typedef Algebraic_real_2 Coordinate_2;
//!@}
public:
//! \name types and functors for \c GPA_2< both >
//!@{
@ -1031,7 +1035,6 @@ public:
//!@}
//!@}
//! \name public functors and predicates
//!@{

View File

@ -385,7 +385,8 @@ public:
virtual void read_halfedge_data(Halfedge_handle)
{}
//@}
/// \name Reading a face.
//@{
void read_face_begin()

View File

@ -174,7 +174,6 @@ public:
*/
virtual Vertex_handle insert_isolated_vertex(const Point_2& pt,
Status_line_iterator iter);
//@}
/// \name Edge-split functions (to be overridden by the child visitor).
//@{

View File

@ -349,6 +349,8 @@ protected:
*/
void _create_edge(Subcurve* sc, Halfedge_handle res_he);
//@}
/*! A visitor class to facilitate the call to create_vertex(). */
class Create_vertex_visitor : public boost::static_visitor<> {
private:

View File

@ -33,7 +33,7 @@
*/
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <boost/graph/graph_concepts.hpp>
#include <CGAL/boost/iterator/counting_iterator.hpp>

View File

@ -34,7 +34,7 @@
*/
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Arrangement_2/graph_traits_dual.h>

View File

@ -34,7 +34,7 @@
*/
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/Arrangement_on_surface_2.h>
#include <CGAL/Arrangement_2/graph_traits_dual.h>

View File

@ -35,7 +35,7 @@
*/
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/Arrangement_on_surface_with_history_2.h>
#include <CGAL/Arrangement_2/graph_traits_dual.h>

View File

@ -35,7 +35,7 @@
*/
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/Arrangement_with_history_2.h>
#include <CGAL/Arrangement_2/graph_traits_dual.h>

View File

@ -254,15 +254,9 @@ The main function illustrates the access to the `id()` field.
\section BGLTriangulations Triangulations as Models of the Boost Graph Concept
Triangulations have vertices and faces, allowing for a direct translation
as a graph. An edge is defined as a pair of a face handle and the
index of the edge.
Particular care has to be taken with the infinite vertex and its incident
edges. One can either use a
<a href="https://www.boost.org/libs/graph/doc/filtered_graph.html">boost::filtered_graph</a>
in order to make the infinite edges
invisible, or one can have a property map that returns an infinite length
for these edges.
A complete list can be found in the documentation of \link BGLT2GT boost::graph_traits \endlink.
as a graph. A halfedge is defined as a pair of a face handle and the
index of the edge. A complete list can be found in the documentation
of \link BGLT2GT boost::graph_traits \endlink.
A classical example for an algorithm that is a combination of
computational geometry and graph theory is the <I>Euclidean Minimum
@ -291,7 +285,7 @@ use the property map returned by the call `get(boost::vertex_index,ft)`.
This property map assumes that the vertex has a
member function `id()` that returns a reference to an int.
Therefore \cgal offers a class `Triangulation_vertex_base_with_id_2`.
It is in the users responsibility to set the indices properly.
It is in the user's responsibility to set the indices properly.
The example further illustrates that the graph traits also works
for the Delaunay triangulation.

View File

@ -33,8 +33,6 @@ struct Linear_cell_complex_bgl_min_items
*/
struct Linear_cell_complex_bgl_min_items {
/// @}
}; /* end Linear_cell_complex_bgl_min_items */
} /* end namespace CGAL */

View File

@ -0,0 +1,45 @@
namespace CGAL {
/*!
\ingroup PkgBGLHelper
The class `Triangulation_face_base_with_id_2` is a model of the
concept `TriangulationFaceBase_2`, the base face of a
2D-triangulation. It provides an integer field that can be used to
index faces for \sc{Bgl} algorithms.
Note that the user is in charge of setting indices correctly before
running a graph algorithm.
\tparam TriangulationTraits_2 is the geometric traits class
and must be a model of `TriangulationTraits_2`.
\tparam TriangulationFaceBase_2 must be a face base class from which
`Triangulation_face_base_with_id_2` derives. It has the default
value `Triangulation_face_base_2<TriangulationTraits_2>`.
\cgalModels `TriangulationFaceBase_2`
\sa `CGAL::Triangulation_face_base_2`
*/
template< typename TriangulationTraits_2, typename TriangulationFaceBase_2 >
class Triangulation_face_base_with_id_2 : public TriangulationFaceBase_2 {
public:
/// \name Access Functions
/// @{
/*!
Returns the index.
*/
int id() const;
/*!
Returns a reference to the index stored in the face.
*/
int& id();
/// @}
}; /* end Triangulation_face_base_with_id_2 */
} /* end namespace CGAL */

View File

@ -4,6 +4,7 @@ PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - CGAL and the Boost Graph Library"
INPUT += ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/Euler_operations.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/iterator.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/helpers.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/generators.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/selection.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/split_graph_into_polylines.h \
${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/boost/graph/copy_face_graph.h \

View File

@ -546,7 +546,12 @@ Methods to read and write graphs.
\cgalPkgPicture{emst-detail.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Andreas Fabri, Fernando Cacciola, Philipp Moeller, and Ron Wein}
\cgalPkgDesc{This package provides a framework for interfacing \cgal data structures with the algorithms of the Boost Graph Library, or \sc{BGL} for short. It allows to run graph algorithms directly on \cgal data structures which are model of the \sc{BGL} graph concepts, for example the shortest path algorithm on a Delaunay triangulation in order to compute the Euclidean minimum spanning tree. Furthermore, it introduces several new graph concepts describing halfedge data structures.}
\cgalPkgDesc{This package provides a framework for interfacing \cgal data structures
with the algorithms of the Boost Graph Library, or \sc{BGL} for short.
It allows to run graph algorithms directly on \cgal data structures which are model
of the \sc{BGL} graph concepts, for example the shortest path algorithm
on a Delaunay triangulation in order to compute the Euclidean minimum spanning tree.
Furthermore, it introduces several new graph concepts describing halfedge data structures.}
\cgalPkgManuals{Chapter_CGAL_and_the_Boost_Graph_Library,PkgBGLRef}
\cgalPkgSummaryEnd
\cgalPkgShortInfoBegin
@ -593,6 +598,7 @@ user might encounter.
\cgalCRPSection{Helper Classes}
- `CGAL::Triangulation_vertex_base_with_id_2`
- `CGAL::Triangulation_face_base_with_id_2`
- `CGAL::Arr_vertex_index_map`
- `CGAL::Arr_face_index_map`
- `CGAL::HalfedgeDS_vertex_max_base_with_id`

View File

@ -150,30 +150,29 @@ and `CGAL::Triangulation_hierarchy_2`
so that they are model of the graph concepts
`BidirectionalGraph`, `VertexAndEdgeListGraph`, and `FaceListGraph`.
The mapping between vertices and edges of the triangulation and the
Only finite simplices exist when viewed through the scope of these graph traits classes.
The infinite vertex, halfedges, edges, and faces will thus not appear when looping around a border
vertex, or walking through the faces container.
The mapping between vertices, edges, and faces 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
`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="https://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.
| Member | Value | Description |
| :----------------------- | :----: | :---------- |
| `vertex_descriptor` | `Triangulation::Vertex_handle` | Identify vertices in the graph. |
| `edge_descriptor` | `unspecified_type` | Identify edges in the graph. It is constructible from and convertible to `Triangulation::Edge`. It 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. |
| `vertex_descriptor` | `unspecified_type` | Identify vertices in the graph. |
| `halfedge_descriptor` | `unspecified_type` | Identify halfedges in the graph. It is constructible from and convertible to `Triangulation::Edge`. It is not a simple typedef, but a proper class, because there is no representation for halfedges in the 2D triangulation data structure. |
| `edge_descriptor` | `unspecified_type` | Identify edges in the graph. It is constructible from and convertible to `Triangulation::Edge`. It 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. |
| `face_descriptor` | `unspecified_type` | 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`. |
| `out_edge_iterator` | `unspecified_type` | An iterator to traverse through the outgoing edges incident to a vertex. Its value type is `edge_descriptor`. |
| `in_edge_iterator` | `unspecified_type` | An iterator to traverse through the incoming edges incident to a vertex. Its value type is `edge_descriptor`. |
| `vertex_iterator` | `unspecified_type` | 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`. |
| `vertex_iterator` | `unspecified_type` | An iterator to traverse through the vertices of the graph. Its value type is `vertex_descriptor`. |
| `halfedge_iterator` | `unspecified_type` | An iterator to traverse through the halfedges of the graph. Its value type is `halfedge_descriptor`. |
| `edge_iterator` | `unspecified_type` | An iterator to traverse through the edges of the graph. Its value type is `edge_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. |
| `edge_parallel_category` | `boost::disallow_parallel_edge_tag` | This graph does not support multiedges. |
| `traversal_category` | Inherits from `boost::bidirectional_graph_tag`, `boost::adjacency_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.. |

View File

@ -1,103 +1,70 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Triangulation_2.h>
#include <CGAL/boost/graph/dijkstra_shortest_paths.h>
#include <boost/graph/filtered_graph.hpp>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Triangulation_2<K> Triangulation;
typedef CGAL::Triangulation_2<K> Triangulation;
// As we want to run Dijskra's shortest path algorithm we only
// consider finite vertices and edges.
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
template <typename T>
struct Is_finite {
typedef std::map<vertex_descriptor, int> VertexIndexMap;
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
const T* t_;
Is_finite()
: t_(NULL)
{}
Is_finite(const T& t)
: t_(&t)
{ }
template <typename VertexOrEdge>
bool operator()(const VertexOrEdge& voe) const {
return ! t_->is_infinite(voe);
}
};
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter> Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator vertex_iterator;
typedef std::map<vertex_descriptor,int> VertexIndexMap;
VertexIndexMap vertex_id_map;
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int
main(int argc,char* argv[])
int main(int argc,char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "data/points.xy";
std::ifstream input(filename);
Triangulation t;
Filter is_finite(t);
Finite_triangulation ft(t, is_finite, is_finite);
Triangulation tr;
Point p ;
while(input >> p){
t.insert(p);
}
while(input >> p)
tr.insert(p);
vertex_iterator vit, ve;
// Associate indices to the vertices
VertexIndexMap vertex_id_map;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int index = 0;
// boost::tie assigns the first and second element of the std::pair
// returned by boost::vertices to the variables vit and ve
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
vertex_id_map[vd]= index++;
}
for(vertex_descriptor vd : vertices(tr))
vertex_id_map[vd] = index++;
// Dijkstra's shortest path needs property maps for the predecessor and distance
// We first declare a vector
std::vector<vertex_descriptor> predecessor(boost::num_vertices(ft));
// and then turn it into a property map
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator,
VertexIdPropertyMap>
predecessor_pmap(predecessor.begin(), vertex_index_pmap);
std::vector<vertex_descriptor> predecessor(num_vertices(tr));
std::vector<double> distance(boost::num_vertices(ft));
boost::iterator_property_map<std::vector<double>::iterator,
VertexIdPropertyMap>
// and then turn it into a property map
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator, VertexIdPropertyMap>
predecessor_pmap(predecessor.begin(), vertex_index_pmap);
std::vector<double> distance(num_vertices(tr));
boost::iterator_property_map<std::vector<double>::iterator, VertexIdPropertyMap>
distance_pmap(distance.begin(), vertex_index_pmap);
// start at an arbitrary vertex
vertex_descriptor source = *boost::vertices(ft).first;
vertex_descriptor source = *vertices(tr).first;
std::cout << "\nStart dijkstra_shortest_paths at " << source->point() <<"\n";
boost::dijkstra_shortest_paths(ft, source,
distance_map(distance_pmap)
.predecessor_map(predecessor_pmap)
.vertex_index_map(vertex_index_pmap));
boost::dijkstra_shortest_paths(tr, source,
distance_map(distance_pmap)
.predecessor_map(predecessor_pmap)
.vertex_index_map(vertex_index_pmap));
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
for(vertex_descriptor vd : vertices(tr))
{
std::cout << vd->point() << " [" << vertex_id_map[vd] << "] ";
std::cout << " has distance = " << boost::get(distance_pmap,vd)
<< " and predecessor ";
vd = boost::get(predecessor_pmap,vd);
std::cout << " has distance = " << boost::get(distance_pmap,vd)
<< " and predecessor ";
vd = boost::get(predecessor_pmap,vd);
std::cout << vd->point() << " [" << vertex_id_map[vd] << "]\n ";
}
return 0;
return EXIT_SUCCESS;
}

View File

@ -1,94 +1,66 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_id_2.h>
#include <CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h>
#include <CGAL/boost/graph/dijkstra_shortest_paths.h>
#include <boost/graph/filtered_graph.hpp>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Triangulation_vertex_base_with_id_2<K> Tvb;
typedef CGAL::Triangulation_face_base_2<K> Tfb;
typedef CGAL::Triangulation_data_structure_2<Tvb,Tfb> Tds;
typedef CGAL::Delaunay_triangulation_2<K, Tds> Triangulation;
typedef CGAL::Triangulation_vertex_base_with_id_2<K> Tvb;
typedef CGAL::Triangulation_face_base_2<K> Tfb;
typedef CGAL::Triangulation_data_structure_2<Tvb, Tfb> Tds;
typedef CGAL::Delaunay_triangulation_2<K, Tds> Triangulation;
// consider finite vertices and edges.
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
template <typename T>
struct Is_finite {
typedef boost::property_map<Triangulation, boost::vertex_index_t>::type VertexIdPropertyMap;
const T* t_;
Is_finite()
: t_(NULL)
{}
Is_finite(const T& t)
: t_(&t)
{ }
template <typename VertexOrEdge>
bool operator()(const VertexOrEdge& voe) const {
return ! t_->is_infinite(voe);
}
};
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter> Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator vertex_iterator;
int
main(int argc,char* argv[])
int main(int argc,char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "data/points.xy";
std::ifstream input(filename);
Triangulation t;
Filter is_finite(t);
Finite_triangulation ft(t, is_finite, is_finite);
Triangulation tr;
Point p ;
while(input >> p){
t.insert(p);
}
Point p;
while(input >> p)
tr.insert(p);
vertex_iterator vit, ve;
// associate indices to the vertices
int index = 0;
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
for(vertex_descriptor vd : vertices(tr))
vd->id()= index++;
}
typedef boost::property_map<Triangulation, boost::vertex_index_t>::type VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap = get(boost::vertex_index, ft);
VertexIdPropertyMap vertex_index_pmap = get(boost::vertex_index, tr);
// Dijkstra's shortest path needs property maps for the predecessor and distance
std::vector<vertex_descriptor> predecessor(boost::num_vertices(ft));
std::vector<vertex_descriptor> predecessor(num_vertices(tr));
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator, VertexIdPropertyMap>
predecessor_pmap(predecessor.begin(), vertex_index_pmap);
std::vector<double> distance(boost::num_vertices(ft));
std::vector<double> distance(num_vertices(tr));
boost::iterator_property_map<std::vector<double>::iterator, VertexIdPropertyMap>
distance_pmap(distance.begin(), vertex_index_pmap);
vertex_descriptor source = *boost::vertices(ft).first;
vertex_descriptor source = *vertices(tr).first;
std::cout << "\nStart dijkstra_shortest_paths at " << source->point() << std::endl;
boost::dijkstra_shortest_paths(ft, source ,
distance_map(distance_pmap)
.predecessor_map(predecessor_pmap));
boost::dijkstra_shortest_paths(tr, source, distance_map(distance_pmap)
.predecessor_map(predecessor_pmap));
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
for(vertex_descriptor vd : vertices(tr))
{
std::cout << vd->point() << " [" << vd->id() << "] ";
std::cout << " has distance = " << get(distance_pmap,vd) << " and predecessor ";
vd = get(predecessor_pmap,vd);
std::cout << vd->point() << " [" << vd->id() << "]\n";
}
return 0;
return EXIT_SUCCESS;
}

View File

@ -1,98 +1,65 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/filtered_graph.hpp>
#include <fstream>
#include <iostream>
#include <map>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Delaunay_triangulation_2<K> Triangulation;
typedef CGAL::Delaunay_triangulation_2<K> Triangulation;
// As we only consider finite vertices and edges
// we need the following filter
template <typename T>
struct Is_finite {
const T* t_;
Is_finite()
: t_(NULL)
{}
Is_finite(const T& t)
: t_(&t)
{ }
template <typename VertexOrEdge>
bool operator()(const VertexOrEdge& voe) const {
return ! t_->is_infinite(voe);
}
};
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter> Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Finite_triangulation>::edge_descriptor edge_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Triangulation>::edge_descriptor edge_descriptor;
// The BGL makes use of indices associated to the vertices
// We use a std::map to store the index
typedef std::map<vertex_descriptor,int> VertexIndexMap;
VertexIndexMap vertex_id_map;
typedef std::map<vertex_descriptor,int> VertexIndexMap;
// A std::map is not a property map, because it is not lightweight
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
int
main(int argc,char* argv[])
int main(int argc,char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "data/points.xy";
std::ifstream input(filename);
Triangulation t;
Filter is_finite(t);
Finite_triangulation ft(t, is_finite, is_finite);
Triangulation tr;
Point p ;
while(input >> p){
t.insert(p);
}
Point p;
while(input >> p)
tr.insert(p);
vertex_iterator vit, ve;
// Associate indices to the vertices
VertexIndexMap vertex_id_map;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int index = 0;
// boost::tie assigns the first and second element of the std::pair
// returned by boost::vertices to the variables vit and ve
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
vertex_id_map[vd]= index++;
}
for(vertex_descriptor vd : vertices(tr))
vertex_id_map[vd] = index++;
// We use the default edge weight which is the squared length of the edge
// This property map is defined in graph_traits_Triangulation_2.h
// In the function call you can see a named parameter: vertex_index_map
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(ft,
std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(tr, std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
for(edge_descriptor ed : mst)
{
vertex_descriptor svd = source(ed, tr);
vertex_descriptor tvd = target(ed, tr);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
for(std::list<edge_descriptor>::iterator it = mst.begin(); it != mst.end(); ++it){
edge_descriptor ed = *it;
vertex_descriptor svd = source(ed,t);
vertex_descriptor tvd = target(ed,t);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
return 0;
return EXIT_SUCCESS;
}

View File

@ -1,4 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>
@ -9,104 +10,71 @@
#include <CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/filtered_graph.hpp>
#include <fstream>
#include <iostream>
#include <map>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Triangulation_vertex_base_2<K> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag> CDT;
typedef CGAL::Triangulation_hierarchy_2<CDT> CDTH;
typedef CGAL::Constrained_triangulation_plus_2<CDTH> Triangulation;
typedef CGAL::Triangulation_vertex_base_2<K> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
typedef CGAL::Triangulation_hierarchy_2<CDT> CDTH;
typedef CGAL::Constrained_triangulation_plus_2<CDTH> Triangulation;
// As we only consider finite vertices and edges
// we need the following filter
template <typename T>
struct Is_finite {
const T* t_;
Is_finite()
: t_(NULL)
{}
Is_finite(const T& t)
: t_(&t)
{ }
template <typename VertexOrEdge>
bool operator()(const VertexOrEdge& voe) const {
return ! t_->is_infinite(voe);
}
};
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter> Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Finite_triangulation>::edge_descriptor edge_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Triangulation>::edge_descriptor edge_descriptor;
// The BGL makes use of indices associated to the vertices
// We use a std::map to store the index
typedef std::map<vertex_descriptor,int> VertexIndexMap;
VertexIndexMap vertex_id_map;
typedef std::map<vertex_descriptor,int> VertexIndexMap;
// A std::map is not a property map, because it is not lightweight
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
int
main(int argc,char* argv[])
int main(int argc,char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "data/points.xy";
std::ifstream input(filename);
Triangulation t;
Filter is_finite(t);
Finite_triangulation ft(t, is_finite, is_finite);
Triangulation tr;
Point p ;
while(input >> p){
t.insert(p);
}
Point p;
while(input >> p)
tr.insert(p);
vertex_iterator vit, ve;
// Associate indices to the vertices
VertexIndexMap vertex_id_map;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int index = 0;
// boost::tie assigns the first and second element of the std::pair
// returned by boost::vertices to the variables vit and ve
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
vertex_id_map[vd]= index++;
}
for(vertex_descriptor vd : vertices(tr))
vertex_id_map[vd] = index++;
// We use the default edge weight which is the squared length of the edge
// This property map is defined in graph_traits_Triangulation_2.h
// In the function call you can see a named parameter: vertex_index_map
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(ft,
std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(tr,
std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
for(edge_descriptor ed : mst)
{
vertex_descriptor svd = source(ed, tr);
vertex_descriptor tvd = target(ed, tr);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
for(std::list<edge_descriptor>::iterator it = mst.begin(); it != mst.end(); ++it){
edge_descriptor ed = *it;
vertex_descriptor svd = source(ed,t);
vertex_descriptor tvd = target(ed,t);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
return 0;
return EXIT_SUCCESS;
}

View File

@ -1,38 +1,24 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Kernel/global_functions_2.h>
#include <CGAL/Regular_triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Regular_triangulation_2.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/filtered_graph.hpp>
#include <fstream>
#include <iostream>
#include <map>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::FT FT;
typedef K::Weighted_point_2 Weighted_point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::FT FT;
typedef K::Weighted_point_2 Weighted_point;
typedef CGAL::Regular_triangulation_2<K> Triangulation;
typedef CGAL::Regular_triangulation_2<K> Triangulation;
// As we only consider finite vertices and edges
// we need the following filter
template <typename T>
struct Is_finite {
const T* t_;
Is_finite() : t_(NULL) { }
Is_finite(const T& t) : t_(&t) { }
template <typename VertexOrEdge>
bool operator()(const VertexOrEdge& voe) const {
return ! t_->is_infinite(voe);
}
};
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Triangulation>::edge_descriptor edge_descriptor;
template <typename T>
struct Compute_edge_weight
@ -42,7 +28,7 @@ struct Compute_edge_weight
Compute_edge_weight(const T& t) : t_(t) { }
typedef typename boost::graph_traits<T>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<T>::edge_descriptor edge_descriptor;
typedef typename boost::graph_traits<T>::edge_descriptor edge_descriptor;
FT operator()(const edge_descriptor ed) const {
vertex_descriptor svd = source(ed, t_);
@ -53,69 +39,54 @@ struct Compute_edge_weight
}
};
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter> Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Finite_triangulation>::edge_descriptor edge_descriptor;
// The BGL makes use of indices associated to the vertices
// We use a std::map to store the index
typedef std::map<vertex_descriptor,int> VertexIndexMap;
VertexIndexMap vertex_id_map;
// A std::map is not a property map, because it is not lightweight
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int
main(int argc,char* argv[])
int main(int argc,char* argv[])
{
const char* filename = (argc > 1) ? argv[1] : "data/weighted_points.xyw";
std::ifstream input(filename);
Triangulation t;
Filter is_finite(t);
Finite_triangulation ft(t, is_finite, is_finite);
Triangulation tr;
Weighted_point wp ;
while(input >> wp){
t.insert(wp);
}
Weighted_point wp;
while(input >> wp)
tr.insert(wp);
// Note that with the input "data/weighted_points.xyw", there is one hidden vertex
std::cout << "number of hidden vertices: " << t.number_of_hidden_vertices() << std::endl;
std::cout << "number of hidden vertices: " << tr.number_of_hidden_vertices() << std::endl;
vertex_iterator vit, ve;
// Associate indices to the vertices
VertexIndexMap vertex_id_map;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int index = 0;
// boost::tie assigns the first and second element of the std::pair
// returned by boost::vertices to the variables vit and ve
for(boost::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
for(vertex_descriptor vd : vertices(tr))
vertex_id_map[vd]= index++;
}
// We use a custom edge length property map that computes the power distance
// between the extremities of an edge of the regular triangulation
typedef Compute_edge_weight<Triangulation> Edge_weight_functor;
// In the function call you can see a named parameter: vertex_index_map
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(
ft, std::back_inserter(mst),
vertex_index_map(vertex_index_pmap).
weight_map(CGAL::internal::boost_::make_function_property_map<
edge_descriptor, FT, Edge_weight_functor>(Edge_weight_functor(t))));
std::list<edge_descriptor> mst;
boost::kruskal_minimum_spanning_tree(tr, std::back_inserter(mst),
vertex_index_map(vertex_index_pmap)
.weight_map(CGAL::internal::boost_::make_function_property_map<
edge_descriptor, FT, Edge_weight_functor>(Edge_weight_functor(tr))));
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
for(std::list<edge_descriptor>::iterator it = mst.begin(); it != mst.end(); ++it){
edge_descriptor ed = *it;
vertex_descriptor svd = source(ed,t);
vertex_descriptor tvd = target(ed,t);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;
for(edge_descriptor ed : mst)
{
vertex_descriptor svd = source(ed, tr);
vertex_descriptor tvd = target(ed, tr);
Triangulation::Vertex_handle sv = svd;
Triangulation::Vertex_handle tv = tvd;
std::cout << "[ " << sv->point() << " | " << tv->point() << " ] " << std::endl;
}
return 0;
return EXIT_SUCCESS;
}

View File

@ -1,4 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/boost/graph/graph_traits_Triangulation_2.h>
@ -6,110 +7,81 @@
#include <boost/graph/filtered_graph.hpp>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic;
typedef CGAL::Projection_traits_xy_3<Epic> K;
typedef K::Point_2 Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic;
typedef CGAL::Projection_traits_xy_3<Epic> K;
typedef K::Point_2 Point;
typedef CGAL::Triangulation_2<K> Triangulation;
typedef CGAL::Triangulation_2<K> Triangulation;
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Triangulation>::halfedge_descriptor halfedge_descriptor;
typedef boost::graph_traits<Triangulation>::halfedge_iterator halfedge_iterator;
typedef boost::graph_traits<Triangulation>::edge_iterator edge_iterator;
typedef boost::graph_traits<Triangulation>::edge_descriptor edge_descriptor;
typedef boost::graph_traits<Triangulation>::face_descriptor face_descriptor;
typedef boost::graph_traits<Triangulation>::face_iterator face_iterator;
typedef std::map<vertex_descriptor, int> VertexIndexMap;
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
typedef boost::graph_traits<Triangulation>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Triangulation>::halfedge_descriptor halfedge_descriptor;
typedef boost::graph_traits<Triangulation>::halfedge_iterator halfedge_iterator;
typedef boost::graph_traits<Triangulation>::face_descriptor face_descriptor;
typedef boost::graph_traits<Triangulation>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Triangulation>::face_iterator face_iterator;
typedef boost::graph_traits<Triangulation>::edge_iterator edge_iterator;
typedef boost::graph_traits<Triangulation>::edge_descriptor edge_descriptor;
typedef boost::property_map<Triangulation, boost::vertex_point_t>::type Ppmap;
typedef std::map<vertex_descriptor,int> VertexIndexMap;
VertexIndexMap vertex_id_map;
typedef boost::associative_property_map<VertexIndexMap> VertexIdPropertyMap;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
typedef std::map<halfedge_descriptor,int> HalfedgeIndexMap;
HalfedgeIndexMap halfedge_id_map;
typedef boost::associative_property_map<HalfedgeIndexMap> HalfedgeIdPropertyMap;
HalfedgeIdPropertyMap halfedge_index_pmap(halfedge_id_map);
int
main(int,char*[])
int main(int /*argc*/, char** /*argc*/)
{
Triangulation t;
Triangulation tr;
t.insert(Point(0.1,0,1));
t.insert(Point(1,0,1));
t.insert(Point(0.2,0.2, 2));
t.insert(Point(0,1,2));
t.insert(Point(0,2,3));
tr.insert(Point(0.1,0,1));
tr.insert(Point(1,0,1));
tr.insert(Point(0.2,0.2, 2));
tr.insert(Point(0,1,2));
tr.insert(Point(0,2,3));
vertex_iterator vit, ve;
// Associate indices to the vertices
VertexIndexMap vertex_id_map;
VertexIdPropertyMap vertex_index_pmap(vertex_id_map);
int index = 0;
// boost::tie assigns the first and second element of the std::pair
// returned by boost::vertices to the variables vit and ve
for(boost::tie(vit,ve) = vertices(t); vit!=ve; ++vit ){
vertex_descriptor vd = *vit;
if(! t.is_infinite(vd)){
vertex_id_map[vd]= index++;
}
}
for(vertex_descriptor vd : vertices(tr))
vertex_id_map[vd] = index++;
std::cerr << index << " vertices" << std::endl;
index = 0;
face_iterator fit,fe;
for(boost::tie(fit,fe) = faces(t); fit!= fe; ++fit){
face_descriptor fd = *fit;
halfedge_descriptor hd = halfedge(fd,t);
halfedge_descriptor n = next(hd,t);
halfedge_descriptor nn = next(n,t);
if(next(nn,t) != hd){
std::cerr << "the face is not a triangle" << std::endl;
}
++index;
}
std::cerr << index << " faces" << std::endl;
index = 0;
edge_iterator eit,ee;
for(boost::tie(eit,ee) = edges(t); eit!= ee; ++eit){
edge_descriptor ed = *eit;
vertex_descriptor vd = source(ed,t);
CGAL_USE(vd);
++index;
}
std::cerr << index << " edges" << std::endl;
index = 0;
halfedge_iterator hit,he;
for(boost::tie(hit,he) = halfedges(t); hit!= he; ++hit){
halfedge_descriptor hd = *hit;
vertex_descriptor vd = source(hd,t);
for(halfedge_descriptor hd : halfedges(tr))
{
vertex_descriptor vd = source(hd, tr);
CGAL_USE(vd);
++index;
}
std::cerr << index << " halfedges" << std::endl;
std::cerr << num_vertices(t) << " " << num_edges(t) << " " << num_halfedges(t) << " " << num_faces(t) << std::endl;
typedef boost::property_map<Triangulation, boost::vertex_point_t>::type Ppmap;
Ppmap ppmap = get(boost::vertex_point, t);
for(vertex_descriptor vd : vertices_around_target(*vertices(t).first, t)){
std::cout << ppmap[vd] << std::endl;
index = 0;
for(edge_descriptor ed : edges(tr))
{
vertex_descriptor vd = source(ed, tr);
CGAL_USE(vd);
++index;
}
std::cerr << index << " edges" << std::endl;
index = 0;
for(face_descriptor fd : faces(tr))
{
halfedge_descriptor hd = halfedge(fd, tr);
CGAL_USE(hd);
++index;
}
std::cerr << index << " faces" << std::endl;
ppmap[*(++vertices(t).first)] = Point(78,1,2);
std::cout << " changed point of vertex " << ppmap[*(++vertices(t).first)] << std::endl;
std::cerr << num_vertices(tr) << " " << num_halfedges(tr) << " " << num_edges(tr) << " " << num_faces(tr) << std::endl;
return 0;
std::cout << "vertices incident to the first vertex:" << std::endl;
Ppmap ppmap = get(boost::vertex_point, tr);
for(vertex_descriptor vd : vertices_around_target(*vertices(tr).first, tr))
std::cout << ppmap[vd] << std::endl;
ppmap[*(++vertices(tr).first)] = Point(78, 1, 2);
std::cout << "changed point of vertex " << ppmap[*(++vertices(tr).first)] << std::endl;
return EXIT_SUCCESS;
}

View File

@ -24,7 +24,7 @@
#include <CGAL/assertions.h>
#include <CGAL/boost/graph/properties.h>
#include <CGAL/boost/graph/iterator.h>
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/Dynamic_property_map.h>
#include <CGAL/assertions.h>
@ -146,9 +146,9 @@ struct Face_filtered_graph
#endif
)
: _graph(const_cast<Graph&>(graph))
, fimap(boost::choose_param(get_param(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(boost::choose_param(get_param(np, boost::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(boost::choose_param(get_param(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
, fimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
{
set_selected_faces(selected_face_patch_indices, face_patch_index_map);
}
@ -201,9 +201,9 @@ struct Face_filtered_graph
const CGAL_BGL_NP_CLASS& np
)
: _graph(const_cast<Graph&>(graph))
, fimap(boost::choose_param(get_param(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(boost::choose_param(get_param(np, boost::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(boost::choose_param(get_param(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
, fimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
{
set_selected_faces(selected_face_patch_index, face_patch_index_map);
}
@ -246,9 +246,9 @@ struct Face_filtered_graph
const FaceRange& selected_faces,
const CGAL_BGL_NP_CLASS& np)
: _graph(const_cast<Graph&>(graph))
, fimap(boost::choose_param(get_param(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(boost::choose_param(get_param(np, boost::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(boost::choose_param(get_param(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
, fimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_index), get_const_property_map(face_index, graph)))
, vimap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_index), get_const_property_map(boost::vertex_index, graph)))
, himap(parameters::choose_parameter(parameters::get_parameter(np, internal_np::halfedge_index), get_const_property_map(halfedge_index, graph)))
{
set_selected_faces(selected_faces);
}

View File

@ -26,7 +26,7 @@
#include <CGAL/boost/graph/copy_face_graph.h>
#include <CGAL/boost/graph/Face_filtered_graph.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/assertions.h>
@ -51,8 +51,8 @@ void partition_dual_graph(const TriangleMesh& tm,
CGAL_precondition(CGAL::is_triangle_mesh(tm));
CGAL_precondition_msg(nparts > 1, ("Partitioning requires a number of parts > 1"));
using boost::choose_param;
using boost::get_param;
using parameters::choose_parameter;
using parameters::get_parameter;
typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
@ -60,7 +60,7 @@ void partition_dual_graph(const TriangleMesh& tm,
// vertex index map
typedef typename CGAL::Polygon_mesh_processing::GetVertexIndexMap<TriangleMesh, NamedParameters>::type Indices;
Indices indices = choose_param(get_param(np, internal_np::vertex_index),
Indices indices = choose_parameter(get_parameter(np, internal_np::vertex_index),
get_const_property_map(boost::vertex_index, tm));
idx_t nn = static_cast<idx_t>(num_vertices(tm));
@ -119,8 +119,8 @@ void partition_dual_graph(const TriangleMesh& tm,
Output_vertex_partition_ids vo;
Output_face_partition_ids fo;
vo(tm, indices, npart, get_param(np, internal_np::vertex_partition_id));
fo(tm, epart, get_param(np, internal_np::face_partition_id));
vo(tm, indices, npart, get_parameter(np, internal_np::vertex_partition_id));
fo(tm, epart, get_parameter(np, internal_np::face_partition_id));
delete[] eptr;
delete[] eind;
@ -131,7 +131,7 @@ void partition_dual_graph(const TriangleMesh& tm,
template<typename TriangleMesh, typename NamedParameters>
void partition_dual_graph(const TriangleMesh& tm, int nparts,
const boost::param_not_found, // no METIS options were passed
const internal_np::Param_not_found, // no METIS options were passed
const NamedParameters& np)
{
idx_t options[METIS_NOPTIONS];
@ -180,9 +180,9 @@ void partition_dual_graph(const TriangleMesh& tm, int nparts,
template<typename TriangleMesh, typename NamedParameters>
void partition_dual_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np)
{
using boost::get_param;
using parameters::get_parameter;
return partition_dual_graph(tm, nparts, get_param(np, internal_np::METIS_options), np);
return partition_dual_graph(tm, nparts, get_parameter(np, internal_np::METIS_options), np);
}
template<typename TriangleMesh>

View File

@ -24,7 +24,7 @@
#include <CGAL/boost/graph/copy_face_graph.h>
#include <CGAL/boost/graph/Face_filtered_graph.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/assertions.h>
@ -44,7 +44,7 @@ struct Output_vertex_partition_ids
{
template<typename TriangleMesh, typename Indices>
void operator()(const TriangleMesh&, const Indices,
idx_t const * const, boost::param_not_found) { }
idx_t const * const, internal_np::Param_not_found) { }
template<typename TriangleMesh,
typename Indices,
@ -64,7 +64,7 @@ struct Output_face_partition_ids
{
template<typename TriangleMesh>
void operator()(const TriangleMesh&,
idx_t const * const, boost::param_not_found) { }
idx_t const * const, internal_np::Param_not_found) { }
template<typename TriangleMesh, typename FacePartitionIDPmap>
void operator()(const TriangleMesh& tm, idx_t const * const epart,
@ -86,8 +86,8 @@ void partition_graph(const TriangleMesh& tm,
CGAL_precondition(CGAL::is_triangle_mesh(tm));
CGAL_precondition_msg(nparts > 1, ("Partitioning requires a number of parts > 1"));
using boost::choose_param;
using boost::get_param;
using parameters::choose_parameter;
using parameters::get_parameter;
typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
@ -95,7 +95,7 @@ void partition_graph(const TriangleMesh& tm,
//Vertex index map
typedef typename CGAL::Polygon_mesh_processing::GetVertexIndexMap<TriangleMesh, NamedParameters>::type Indices;
Indices indices = choose_param(get_param(np, internal_np::vertex_index),
Indices indices = choose_parameter(get_parameter(np, internal_np::vertex_index),
get_const_property_map(boost::vertex_index, tm));
idx_t nn = static_cast<idx_t>(num_vertices(tm));
@ -151,8 +151,8 @@ void partition_graph(const TriangleMesh& tm,
Output_vertex_partition_ids vo;
Output_face_partition_ids fo;
vo(tm, indices, npart, get_param(np, internal_np::vertex_partition_id));
fo(tm, epart, get_param(np, internal_np::face_partition_id));
vo(tm, indices, npart, get_parameter(np, internal_np::vertex_partition_id));
fo(tm, epart, get_parameter(np, internal_np::face_partition_id));
delete[] eptr;
delete[] eind;
@ -163,7 +163,7 @@ void partition_graph(const TriangleMesh& tm,
template<typename TriangleMesh, typename NamedParameters>
void partition_graph(const TriangleMesh& tm, int nparts,
const boost::param_not_found, // no METIS options were passed
const internal_np::Param_not_found, // no METIS options were passed
const NamedParameters& np)
{
idx_t options[METIS_NOPTIONS];
@ -212,9 +212,9 @@ void partition_graph(const TriangleMesh& tm, int nparts,
template<typename TriangleMesh, typename NamedParameters>
void partition_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np)
{
using boost::get_param;
using parameters::get_parameter;
return partition_graph(tm, nparts, get_param(np, internal_np::METIS_options), np);
return partition_graph(tm, nparts, get_parameter(np, internal_np::METIS_options), np);
}
template<typename TriangleMesh>

View File

@ -0,0 +1,237 @@
// Copyright (c) 2019 GeometryFactory (France). 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 Lesser 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$
// SPDX-License-Identifier: LGPL-3.0+
//
//
// Author(s) : Sebastien Loriot
#ifndef CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
#define CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H
#include <CGAL/basic.h>
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/if.hpp>
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS T, typename Tag, typename Base
#define CGAL_BGL_NP_CLASS CGAL::Named_function_parameters<T,Tag,Base>
namespace CGAL {
namespace internal_np{
struct No_property {};
struct Param_not_found {};
enum all_default_t { all_default };
// define enum types and values for new named parameters
#define CGAL_add_named_parameter(X, Y, Z) \
enum X { Y };
#include <CGAL/boost/graph/parameters_interface.h>
#undef CGAL_add_named_parameter
template <typename T, typename Tag, typename Base>
struct Named_params_impl : Base
{
T v; // copy of the parameter
Named_params_impl(T v, const Base& b)
: Base(b)
, v(v)
{}
};
// partial specialization for base class of the recursive nesting
template <typename T, typename Tag>
struct Named_params_impl<T, Tag, No_property>
{
T v; // copy of the parameter
Named_params_impl(T v)
: v(v)
{}
};
// Helper class to get the type of a named parameter pack given a query tag
template <typename NP, typename Query_tag>
struct Get_param;
template< typename T, typename Tag, typename Query_tag>
struct Get_param< Named_params_impl<T, Tag, No_property>, Query_tag >
{
typedef Param_not_found type;
};
template< typename T, typename Tag, typename Base>
struct Get_param< Named_params_impl<T, Tag, Base>, Tag >
{
typedef T type;
};
template< typename T, typename Tag>
struct Get_param< Named_params_impl<T, Tag, No_property>, Tag >
{
typedef T type;
};
template< typename T, typename Tag, typename Base, typename Query_tag>
struct Get_param< Named_params_impl<T,Tag,Base>, Query_tag>
{
typedef typename Get_param<typename Base::base, Query_tag>::type type;
};
// helper to choose the default
template <typename Query_tag, typename NP, typename D>
struct Lookup_named_param_def
{
typedef typename internal_np::Get_param<typename NP::base, Query_tag>::type NP_type;
typedef typename boost::mpl::if_<
boost::is_same<NP_type, internal_np::Param_not_found>,
D, NP_type>::type
type;
};
// helper function to extract the value from a named parameter pack given a query tag
template <typename T, typename Tag, typename Base>
T get_parameter_impl(const Named_params_impl<T, Tag, Base>& np, Tag)
{
return np.v;
}
template< typename T, typename Tag, typename Query_tag>
Param_not_found get_parameter_impl(const Named_params_impl<T, Tag, No_property>&, Query_tag)
{
return Param_not_found();
}
template< typename T, typename Tag>
T get_parameter_impl(const Named_params_impl<T, Tag, No_property>& np, Tag)
{
return np.v;
};
template <typename T, typename Tag, typename Base, typename Query_tag>
typename Get_param<Named_params_impl<T, Tag, Base>, Query_tag>::type
get_parameter_impl(const Named_params_impl<T, Tag, Base>& np, Query_tag tag)
{
CGAL_static_assertion( (!boost::is_same<Query_tag, Tag>::value) );
return get_parameter_impl(static_cast<const typename Base::base&>(np), tag);
}
} // end of internal_np namespace
template <typename T, typename Tag, typename Base = internal_np::No_property>
struct Named_function_parameters
: internal_np::Named_params_impl<T, Tag, Base>
{
typedef internal_np::Named_params_impl<T, Tag, Base> base;
typedef Named_function_parameters<T, Tag, Base> self;
Named_function_parameters(T v = T()) : base(v) {}
Named_function_parameters(T v, const Base& b) : base(v, b) {}
Named_function_parameters<bool, internal_np::all_default_t, self>
all_default() const
{
typedef Named_function_parameters<bool, internal_np::all_default_t, self> Params;
return Params(*this);
}
// create the functions for new named parameters and the one imported boost
// used to concatenate several parameters
#define CGAL_add_named_parameter(X, Y, Z) \
template<typename K> \
Named_function_parameters<K, internal_np::X, self> \
Z(const K& k) const \
{ \
typedef Named_function_parameters<K, internal_np::X, self> Params;\
return Params(k, *this); \
}
#include <CGAL/boost/graph/parameters_interface.h>
#undef CGAL_add_named_parameter
};
namespace parameters {
Named_function_parameters<bool, internal_np::all_default_t>
inline all_default()
{
typedef Named_function_parameters<bool, internal_np::all_default_t> Params;
return Params();
}
template <typename T, typename Tag, typename Base>
Named_function_parameters<T,Tag,Base>
inline no_parameters(Named_function_parameters<T,Tag,Base>)
{
typedef Named_function_parameters<T,Tag,Base> Params;
return Params();
}
// define free functions for named parameters
#define CGAL_add_named_parameter(X, Y, Z) \
template <typename K> \
Named_function_parameters<K, internal_np::X> \
Z(K const& p) \
{ \
typedef Named_function_parameters<K, internal_np::X> Params;\
return Params(p); \
}
#include <CGAL/boost/graph/parameters_interface.h>
#undef CGAL_add_named_parameter
// function to extract a parameter
template <typename T, typename Tag, typename Base, typename Query_tag>
typename internal_np::Get_param<internal_np::Named_params_impl<T, Tag, Base>, Query_tag>::type
get_parameter(const Named_function_parameters<T, Tag, Base>& np, Query_tag tag)
{
return internal_np::get_parameter_impl(static_cast<const internal_np::Named_params_impl<T, Tag, Base>&>(np), tag);
}
template <typename D>
D choose_parameter(const internal_np::Param_not_found&, const D& d)
{
return d;
}
template <typename T, typename D>
const T&
choose_parameter(const T& t, const D&)
{
return t;
}
bool inline is_default_parameter(const internal_np::Param_not_found&)
{
return true;
}
template <class T>
bool is_default_parameter(const T&)
{
return false;
}
} // end of parameters namespace
} //namespace CGAL
#endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP

View File

@ -29,7 +29,7 @@
#include <CGAL/boost/graph/Euler_operations.h>
#include <CGAL/boost/graph/iterator.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/property_map.h>
#include <boost/unordered_map.hpp>
@ -248,7 +248,7 @@ boost::function_output_iterator<Output_iterator_functor<PMAP> > make_functor(PMA
return boost::make_function_output_iterator(Output_iterator_functor<PMAP>(map));
}
inline Emptyset_iterator make_functor(const boost::param_not_found&)
inline Emptyset_iterator make_functor(const internal_np::Param_not_found&)
{
return Emptyset_iterator();
}
@ -332,26 +332,27 @@ template <typename SourceMesh, typename TargetMesh,
>
void copy_face_graph(const SourceMesh& sm, TargetMesh& tm,
#ifndef DOXYGEN_RUNNING
const CGAL::cgal_bgl_named_params<T1,Tag1,Base1>& np1,
const CGAL::cgal_bgl_named_params<T2,Tag2,Base2>& np2
const CGAL::Named_function_parameters<T1,Tag1,Base1>& np1,
const CGAL::Named_function_parameters<T2,Tag2,Base2>& np2
#else
const NamedParameters1& np1,
const NamedParameters2& np2
#endif
)
{
using boost::choose_param;
using parameters::choose_parameter;
using parameters::get_parameter;
internal::copy_face_graph(sm, tm,
CGAL::graph_has_property<SourceMesh,boost::halfedge_index_t>(),
choose_param(get_param(np1, internal_np::vertex_to_vertex_output_iterator),
impl::make_functor(get_param(np1, internal_np::vertex_to_vertex_map))),
choose_param(get_param(np1, internal_np::halfedge_to_halfedge_output_iterator),
impl::make_functor(get_param(np1, internal_np::halfedge_to_halfedge_map))),
choose_param(get_param(np1, internal_np::face_to_face_output_iterator),
impl::make_functor(get_param(np1, internal_np::face_to_face_map))),
choose_param(get_param(np1, internal_np::vertex_point),
choose_parameter(get_parameter(np1, internal_np::vertex_to_vertex_output_iterator),
impl::make_functor(get_parameter(np1, internal_np::vertex_to_vertex_map))),
choose_parameter(get_parameter(np1, internal_np::halfedge_to_halfedge_output_iterator),
impl::make_functor(get_parameter(np1, internal_np::halfedge_to_halfedge_map))),
choose_parameter(get_parameter(np1, internal_np::face_to_face_output_iterator),
impl::make_functor(get_parameter(np1, internal_np::face_to_face_map))),
choose_parameter(get_parameter(np1, internal_np::vertex_point),
get(vertex_point, sm)),
choose_param(get_param(np2, internal_np::vertex_point),
choose_parameter(get_parameter(np2, internal_np::vertex_point),
get(vertex_point, tm)));
}
@ -364,7 +365,7 @@ void copy_face_graph(const SourceMesh& sm, TargetMesh& tm)
template <typename SourceMesh, typename TargetMesh,
typename T, typename Tag, typename Base >
void copy_face_graph(const SourceMesh& sm, TargetMesh& tm,
const CGAL::cgal_bgl_named_params<T,Tag,Base>& np)
const CGAL::Named_function_parameters<T,Tag,Base>& np)
{
copy_face_graph(sm, tm, np, parameters::all_default());
}

View File

@ -23,7 +23,7 @@
#define CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H
// This will push/pop a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <boost/version.hpp>
#include <climits>

View File

@ -0,0 +1,829 @@
// Copyright (c) 2014, 2017 GeometryFactory (France). All rights reserved.
// 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 Lesser 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$
// SPDX-License-Identifier: LGPL-3.0+
//
// Author(s) : Maxime Gimeno,
// Mael Rouxel-Labbé
#ifndef CGAL_BOOST_GRAPH_GENERATORS_H
#define CGAL_BOOST_GRAPH_GENERATORS_H
#include <CGAL/boost/graph/iterator.h>
#include <CGAL/boost/graph/properties.h>
#include <CGAL/Random.h>
#include <CGAL/function_objects.h>
namespace CGAL {
namespace Euler {
// Some forward declaration to break the helpers.h > generators.h > Euler_operations.h cycle
template< typename Graph>
void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
Graph& g);
template<typename Graph , typename VertexRange >
typename boost::graph_traits<Graph>::face_descriptor add_face(const VertexRange& vr,
Graph& g);
} // namespace Euler
namespace internal {
template <class FaceGraph>
void swap_vertices(typename boost::graph_traits<FaceGraph>::vertex_descriptor& p,
typename boost::graph_traits<FaceGraph>::vertex_descriptor& q,
FaceGraph& g);
template<typename InputIterator>
typename std::iterator_traits<InputIterator>::value_type
random_entity_in_range(InputIterator first, InputIterator beyond,
CGAL::Random& rnd = get_default_random())
{
typedef typename std::iterator_traits<InputIterator>::difference_type size_type;
size_type zero = 0, ne = std::distance(first, beyond);
std::advance(first, rnd.uniform_int(zero, ne - 1));
return *first;
}
template<typename InputIterator>
typename std::iterator_traits<InputIterator>::value_type
random_entity_in_range(const CGAL::Iterator_range<InputIterator>& range,
CGAL::Random& rnd = get_default_random())
{
return random_entity_in_range(range.begin(), range.end(), rnd);
}
// \brief returns a random non-null vertex incident to the face `fd` of the polygon mesh `g`.
// \tparam Graph a model of `HalfedgeGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::vertex_descriptor
random_vertex_in_face(typename boost::graph_traits<Graph>::face_descriptor fd,
const Graph& g,
CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(vertices_around_face(halfedge(fd, g), g), rnd);
}
// \brief returns a random non-null halfedge incident to the face `fd` of the polygon mesh `g`.
// \tparam Graph a model of `HalfedgeGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::halfedge_descriptor
random_halfedge_in_face(typename boost::graph_traits<Graph>::face_descriptor fd,
const Graph& g,
CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(halfedges_around_face(halfedge(fd, g), g), rnd);
}
// \brief returns a random non-null vertex of the polygon mesh `g`.
// \tparam Graph a model of `VertexListGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::vertex_descriptor
random_vertex_in_mesh(const Graph& g, CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(vertices(g), rnd);
}
// \brief returns a random non-null halfedge of the polygon mesh `g`.
// \tparam Graph a model of `HalfedgeListGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::halfedge_descriptor
random_halfedge_in_mesh(const Graph& g, CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(halfedges(g), rnd);
}
// \brief returns a random non-null edge of the polygon mesh `g`.
// \tparam Graph a model of `EdgeListGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::edge_descriptor
random_edge_in_mesh(const Graph& g, CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(edges(g), rnd);
}
// \brief returns a random non-null face of the polygon mesh `g`.
// \tparam Graph a model of `FaceListGraph`
template<typename Graph>
typename boost::graph_traits<Graph>::face_descriptor
random_face_in_mesh(const Graph& g, CGAL::Random& rnd = get_default_random())
{
return internal::random_entity_in_range(faces(g), rnd);
}
} // namespace internal
/**
* \ingroup PkgBGLHelperFct
*
* \brief Creates an isolated triangle
* with its vertices initialized to `p0`, `p1` and `p2`, and adds it to the graph `g`.
*
* \returns the non-border halfedge that has the target vertex associated with `p0`.
**/
template<typename Graph, typename P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_triangle(const P& p0, const P& p1, const P& p2, Graph& g)
{
typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
Point_property_map ppmap = get(CGAL::vertex_point, g);
vertex_descriptor v0, v1, v2;
v0 = add_vertex(g);
v1 = add_vertex(g);
v2 = add_vertex(g);
ppmap[v0] = p0;
ppmap[v1] = p1;
ppmap[v2] = p2;
halfedge_descriptor h0 = halfedge(add_edge(g), g);
halfedge_descriptor h1 = halfedge(add_edge(g), g);
halfedge_descriptor h2 = halfedge(add_edge(g), g);
set_next(h0, h1, g);
set_next(h1, h2, g);
set_next(h2, h0, g);
set_target(h0, v1, g);
set_target(h1, v2, g);
set_target(h2, v0, g);
set_halfedge(v1, h0, g);
set_halfedge(v2, h1, g);
set_halfedge(v0, h2, g);
face_descriptor f = add_face(g);
set_face(h0, f, g);
set_face(h1, f, g);
set_face(h2, f, g);
set_halfedge(f, h0, g);
h0 = opposite(h0, g);
h1 = opposite(h1, g);
h2 = opposite(h2, g);
set_next(h0, h2, g);
set_next(h2, h1, g);
set_next(h1, h0, g);
set_target(h0, v0, g);
set_target(h1, v1, g);
set_target(h2, v2, g);
set_face(h0, boost::graph_traits<Graph>::null_face(), g);
set_face(h1, boost::graph_traits<Graph>::null_face(), g);
set_face(h2, boost::graph_traits<Graph>::null_face(), g);
return opposite(h2, g);
}
namespace internal {
template<typename Graph>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_quad(typename boost::graph_traits<Graph>::vertex_descriptor v0,
typename boost::graph_traits<Graph>::vertex_descriptor v1,
typename boost::graph_traits<Graph>::vertex_descriptor v2,
typename boost::graph_traits<Graph>::vertex_descriptor v3,
Graph& g)
{
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
halfedge_descriptor h0 = halfedge(add_edge(g), g);
halfedge_descriptor h1 = halfedge(add_edge(g), g);
halfedge_descriptor h2 = halfedge(add_edge(g), g);
halfedge_descriptor h3 = halfedge(add_edge(g), g);
set_next(h0, h1, g);
set_next(h1, h2, g);
set_next(h2, h3, g);
set_next(h3, h0, g);
set_target(h0, v1, g);
set_target(h1, v2, g);
set_target(h2, v3, g);
set_target(h3, v0, g);
set_halfedge(v1, h0, g);
set_halfedge(v2, h1, g);
set_halfedge(v3, h2, g);
set_halfedge(v0, h3, g);
face_descriptor f = add_face(g);
set_face(h0, f, g);
set_face(h1, f, g);
set_face(h2, f, g);
set_face(h3, f, g);
set_halfedge(f, h0, g);
h0 = opposite(h0, g);
h1 = opposite(h1, g);
h2 = opposite(h2, g);
h3 = opposite(h3, g);
set_next(h0, h3, g);
set_next(h3, h2, g);
set_next(h2, h1, g);
set_next(h1, h0, g);
set_target(h0, v0, g);
set_target(h1, v1, g);
set_target(h2, v2, g);
set_target(h3, v3, g);
set_face(h0, boost::graph_traits<Graph>::null_face(), g);
set_face(h1, boost::graph_traits<Graph>::null_face(), g);
set_face(h2, boost::graph_traits<Graph>::null_face(), g);
set_face(h3, boost::graph_traits<Graph>::null_face(), g);
return opposite(h3, g);
}
// default Functor for make_grid
template<typename Size_type, typename Point>
struct Default_grid_maker
: public CGAL::Creator_uniform_3<Size_type, Point>
{
Point operator()(const Size_type& i, const Size_type& j) const {
return CGAL::Creator_uniform_3<Size_type, Point>::operator ()(i,j,0);
}
};
} // namespace internal
/**
* \ingroup PkgBGLHelperFct
*
* \brief Creates an isolated quad with
* its vertices initialized to `p0`, `p1`, `p2`, and `p3`, and adds it to the graph `g`.
*
* \returns the non-border halfedge that has the target vertex associated with `p0`.
**/
template<typename Graph, typename P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_quad(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
{
typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
Point_property_map ppmap = get(CGAL::vertex_point, g);
vertex_descriptor v0, v1, v2, v3;
v0 = add_vertex(g);
v1 = add_vertex(g);
v2 = add_vertex(g);
v3 = add_vertex(g);
ppmap[v0] = p0;
ppmap[v1] = p1;
ppmap[v2] = p2;
ppmap[v3] = p3;
return internal::make_quad(v0, v1, v2, v3, g);
}
/**
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated hexahedron
* with its vertices initialized to `p0`, `p1`, ...\ , and `p7`, and adds it to the graph `g`.
* \image html hexahedron.png
* \image latex hexahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, `p2`, and `p3`.
**/
template<typename Graph, typename P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
const P& p4, const P& p5, const P& p6, const P& p7, Graph& g)
{
typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
Point_property_map ppmap = get(CGAL::vertex_point, g);
vertex_descriptor v0, v1, v2, v3, v4, v5, v6, v7;
v0 = add_vertex(g);
v1 = add_vertex(g);
v2 = add_vertex(g);
v3 = add_vertex(g);
v4 = add_vertex(g);
v5 = add_vertex(g);
v6 = add_vertex(g);
v7 = add_vertex(g);
ppmap[v0] = p0;
ppmap[v1] = p1;
ppmap[v2] = p2;
ppmap[v3] = p3;
ppmap[v4] = p4;
ppmap[v5] = p5;
ppmap[v6] = p6;
ppmap[v7] = p7;
halfedge_descriptor ht = internal::make_quad(v4, v5, v6, v7, g);
halfedge_descriptor hb = prev(internal::make_quad(v0, v3, v2, v1, g), g);
for(int i=0; i <4; ++i)
{
halfedge_descriptor h = halfedge(add_edge(g), g);
set_target(h,target(hb, g), g);
set_next(h, opposite(hb, g), g);
set_next(opposite(prev(ht, g), g), h, g);
h = opposite(h, g);
set_target(h, source(prev(ht, g), g), g);
set_next(h, opposite(next(next(ht, g), g), g), g);
set_next(opposite(next(hb, g), g), h, g);
hb = next(hb, g);
ht = prev(ht, g);
}
for(int i=0; i <4; ++i)
{
Euler::fill_hole(opposite(hb, g), g);
hb = next(hb, g);
}
return next(next(hb, g), g);
}
/**
* \ingroup PkgBGLHelperFct
* \brief Creates an isolated tetrahedron
* with its vertices initialized to `p0`, `p1`, `p2`, and `p3`, and adds it to the graph `g`.
* \image html tetrahedron.png
* \image latex tetrahedron.png
* \returns the halfedge that has the target vertex associated with `p0`, in the face with the vertices with the points `p0`, `p1`, and `p2`.
**/
template<typename Graph, typename P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_tetrahedron(const P& p0, const P& p1, const P& p2, const P& p3, Graph& g)
{
typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::face_descriptor face_descriptor;
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
Point_property_map ppmap = get(CGAL::vertex_point, g);
vertex_descriptor v0, v1, v2, v3;
v0 = add_vertex(g);
v2 = add_vertex(g); // this and the next line are switched to keep points in order
v1 = add_vertex(g);
v3 = add_vertex(g);
ppmap[v0] = p0;
ppmap[v1] = p2;// this and the next line are switched to reorient the surface
ppmap[v2] = p1;
ppmap[v3] = p3;
halfedge_descriptor h0 = halfedge(add_edge(g), g);
halfedge_descriptor h1 = halfedge(add_edge(g), g);
halfedge_descriptor h2 = halfedge(add_edge(g), g);
set_next(h0, h1, g);
set_next(h1, h2, g);
set_next(h2, h0, g);
set_target(h0, v1, g);
set_target(h1, v2, g);
set_target(h2, v0, g);
set_halfedge(v1, h0, g);
set_halfedge(v2, h1, g);
set_halfedge(v0, h2, g);
face_descriptor f = add_face(g);
set_face(h0, f, g);
set_face(h1, f, g);
set_face(h2, f, g);
set_halfedge(f, h0, g);
h0 = opposite(h0, g);
h1 = opposite(h1, g);
h2 = opposite(h2, g);
set_next(h0, h2, g);
set_next(h2, h1, g);
set_next(h1, h0, g);
set_target(h0, v0, g);
set_target(h1, v1, g);
set_target(h2, v2, g);
halfedge_descriptor h3 = halfedge(add_edge(g), g);
halfedge_descriptor h4 = halfedge(add_edge(g), g);
halfedge_descriptor h5 = halfedge(add_edge(g), g);
set_target(h3, v3, g);
set_target(h4, v3, g);
set_target(h5, v3, g);
set_halfedge(v3, h3, g);
set_next(h0, h3, g);
set_next(h1, h4, g);
set_next(h2, h5, g);
set_next(h3, opposite(h4, g), g);
set_next(h4, opposite(h5, g), g);
set_next(h5, opposite(h3, g), g);
set_next(opposite(h4, g), h0, g);
set_next(opposite(h5, g), h1, g);
set_next(opposite(h3, g), h2, g);
set_target(opposite(h3, g), v0, g);
set_target(opposite(h4, g), v1, g);
set_target(opposite(h5, g), v2, g);
f = add_face(g);
set_halfedge(f, h0, g);
set_face(h0, f, g);
set_face(h3, f, g);
set_face(opposite(h4, g), f, g);
f = add_face(g);
set_halfedge(f, h1, g);
set_face(h1, f, g);
set_face(h4, f, g);
set_face(opposite(h5, g), f, g);
f = add_face(g);
set_halfedge(f, h2, g);
set_face(h2, f, g);
set_face(h5, f, g);
set_face(opposite(h3, g), f, g);
return opposite(h2, g);
}
/**
* \ingroup PkgBGLHelperFct
*
* \brief Creates a triangulated regular prism, outward oriented,
* having `nb_vertices` vertices in each of its bases and adds it to the graph `g`.
* If `center` is (0, 0, 0), then the first point of the prism is (`radius`, `height`, 0)
*
* \param nb_vertices the number of vertices per base. It must be greater than or equal to 3.
* \param g the graph in which the regular prism will be created.
* \param base_center the center of the circle in which the lower base is inscribed.
* \param height the distance between the two bases.
* \param radius the radius of the circles in which the bases are inscribed.
* \param is_closed determines if the bases must be created or not. If `is_closed` is `true`, `center` is a vertex.
*
* \returns the halfedge that has the target vertex associated with the first point in the first face.
*/
template<class Graph, class P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_regular_prism(typename boost::graph_traits<Graph>::vertices_size_type nb_vertices,
Graph& g,
const P& base_center = P(0,0,0),
typename CGAL::Kernel_traits<P>::Kernel::FT height = 1.0,
typename CGAL::Kernel_traits<P>::Kernel::FT radius = 1.0,
bool is_closed = true)
{
CGAL_assertion(nb_vertices >= 3);
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename CGAL::Kernel_traits<P>::Kernel::FT FT;
typedef typename boost::property_map<Graph, vertex_point_t>::type Point_property_map;
Point_property_map vpmap = get(CGAL::vertex_point, g);
const FT to_rad = CGAL_PI / 180.0;
const FT precision = 360.0 / nb_vertices;
const FT diameter = 2 * radius;
std::vector<vertex_descriptor> vertices;
vertices.resize(nb_vertices*2);
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices*2; ++i)
vertices[i] = add_vertex(g);
//fill vertices
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i < nb_vertices; ++i)
{
put(vpmap, vertices[i],
P(0.5*diameter * cos(i*precision*to_rad) + base_center.x(),
height+base_center.y(),
-0.5*diameter * sin(i*precision*to_rad) + base_center.z()));
put(vpmap,
vertices[i+nb_vertices],
P(0.5*diameter * cos(i*precision*to_rad) + base_center.x(),
base_center.y(),
-0.5*diameter * sin(i*precision*to_rad) + base_center.z()));
}
//fill faces
std::vector<vertex_descriptor> face;
face.resize(3);
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
{
face[0] = vertices[(i+1)%(nb_vertices)];
face[1] = vertices[i];
face[2] = vertices[(i+1)%(nb_vertices) + nb_vertices];
Euler::add_face(face, g);
face[0] = vertices[(i+1)%(nb_vertices) + nb_vertices];
face[1] = vertices[i];
face[2] = vertices[i + nb_vertices];
Euler::add_face(face, g);
}
//close
if(is_closed)
{
//add the base_center of the fans
vertex_descriptor top = add_vertex(g);
vertex_descriptor bot = add_vertex(g);
put(vpmap, top, P(base_center.x(), height+base_center.y(),base_center.z()));
put(vpmap, bot, P(base_center.x(),base_center.y(),base_center.z()));
//add the faces
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
{
face[0] = vertices[i];
face[1] = vertices[(i+1)%(nb_vertices)];
face[2] = top;
Euler::add_face(face, g);
face[0] = bot;
face[1] = vertices[(i+1)%(nb_vertices) + nb_vertices];
face[2] = vertices[i + nb_vertices];
Euler::add_face(face, g);
}
}
return halfedge(vertices[0], vertices[1], g).first;
}
/**
* \ingroup PkgBGLHelperFct
* \brief Creates a pyramid, outward oriented, having `nb_vertices` vertices in its base and adds it to the graph `g`.
*
* If `center` is `(0, 0, 0)`, then the first point of the base is `(radius, 0, 0)`
*
* \param nb_vertices the number of vertices in the base. It must be greater than or equal to 3.
* \param g the graph in which the pyramid will be created
* \param base_center the center of the circle in which the base is inscribed.
* \param height the distance between the base and the apex.
* \param radius the radius of the circle in which the base is inscribed.
* \param is_closed determines if the base must be created or not. If `is_closed` is `true`, `center` is a vertex.
*
* \returns the halfedge that has the target vertex associated with the apex point in the first face.
*/
template<class Graph, class P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_pyramid(typename boost::graph_traits<Graph>::vertices_size_type nb_vertices,
Graph& g,
const P& base_center = P(0,0,0),
typename CGAL::Kernel_traits<P>::Kernel::FT height = 1.0,
typename CGAL::Kernel_traits<P>::Kernel::FT radius = 1.0,
bool is_closed = true)
{
CGAL_assertion(nb_vertices >= 3);
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename CGAL::Kernel_traits<P>::Kernel::FT FT;
const FT to_rad = CGAL_PI / 180.0;
const FT precision = 360.0/nb_vertices;
const FT diameter = 2*radius;
Point_property_map vpmap = get(CGAL::vertex_point, g);
std::vector<vertex_descriptor> vertices;
vertices.resize(nb_vertices);
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
vertices[i] = add_vertex(g);
vertex_descriptor apex = add_vertex(g);
//fill vertices
put(vpmap, apex,
P(base_center.x(),
base_center.y() + height,
base_center.z()));
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
{
put(vpmap, vertices[i],
P(0.5*diameter*cos(i*precision*to_rad)+base_center.x(),
base_center.y(),
-0.5*diameter*sin(i*precision*to_rad)+base_center.z()));
}
//fill faces
std::vector<vertex_descriptor> face;
face.resize(3);
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
{
face[0] = apex;
face[1] = vertices[i];
face[2] = vertices[(i+1)%(nb_vertices)];
Euler::add_face(face, g);
}
//close
if(is_closed)
{
//add the center of the fan
vertex_descriptor bot = add_vertex(g);
put(vpmap, bot, P(base_center.x(),base_center.y(),base_center.z()));
//add the faces
for(typename boost::graph_traits<Graph>::vertices_size_type i=0; i<nb_vertices; ++i)
{
face[0] = bot;
face[1] = vertices[(i+1)%(nb_vertices)];
face[2] = vertices[i];
Euler::add_face(face, g);
}
}
return halfedge(vertices[0], apex, g).first;
}
/**
* \ingroup PkgBGLHelperFct
*
* \brief Creates an icosahedron, outward oriented, centered in `center` and adds it to the graph `g`.
*
* \param g the graph in which the icosahedron will be created.
* \param center the center of the sphere in which the icosahedron is inscribed.
* \param radius the radius of the sphere in which the icosahedron is inscribed.
*
* \returns the halfedge that has the target vertex associated with the first point in the first face.
*/
template<class Graph, class P>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_icosahedron(Graph& g,
const P& center = P(0,0,0),
typename CGAL::Kernel_traits<P>::Kernel::FT radius = 1.0)
{
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
Point_property_map vpmap = get(CGAL::vertex_point, g);
// create the initial icosahedron
std::vector<vertex_descriptor> v_vertices;
v_vertices.resize(12);
for(int i=0; i<12; ++i)
v_vertices[i] = add_vertex(g);
typename CGAL::Kernel_traits<P>::Kernel::FT t = radius * (1.0 + CGAL::approximate_sqrt(5.0)) / 2.0;
put(vpmap, v_vertices[0], P(-radius + center.x(), t + center.y(), 0.0 + center.z()));
put(vpmap, v_vertices[1], P( radius + center.x(), t + center.y(), 0.0 + center.z()));
put(vpmap, v_vertices[2], P(-radius + center.x(), -t + center.y(), 0.0 + center.z()));
put(vpmap, v_vertices[3], P( radius + center.x(), -t + center.y(), 0.0 + center.z()));
put(vpmap, v_vertices[4], P( 0.0 + center.x(), -radius + center.y(), t + center.z()));
put(vpmap, v_vertices[5], P( 0.0 + center.x(), radius + center.y(), t + center.z()));
put(vpmap, v_vertices[6], P( 0.0 + center.x(), -radius + center.y(), -t + center.z()));
put(vpmap, v_vertices[7], P( 0.0 + center.x(), radius + center.y(), -t + center.z()));
put(vpmap, v_vertices[8], P( t + center.x(), 0.0 + center.y(), -radius + center.z()));
put(vpmap, v_vertices[9], P( t + center.x(), 0.0 + center.y(), radius + center.z()));
put(vpmap, v_vertices[10], P(-t + center.x(), 0.0 + center.y(), -radius + center.z()));
put(vpmap, v_vertices[11], P(-t + center.x(), 0.0 + center.y(), radius + center.z()));
std::vector<vertex_descriptor> face;
face.resize(3);
face[1] = v_vertices[0]; face[0] = v_vertices[5]; face[2] = v_vertices[11];
Euler::add_face(face, g);
face[1] = v_vertices[0]; face[0] = v_vertices[1]; face[2] = v_vertices[5];
Euler::add_face(face, g);
face[1] = v_vertices[0]; face[0] = v_vertices[7]; face[2] = v_vertices[1];
Euler::add_face(face, g);
face[1] = v_vertices[0]; face[0] = v_vertices[10]; face[2] = v_vertices[7];
Euler::add_face(face, g);
face[1] = v_vertices[0]; face[0] = v_vertices[11]; face[2] = v_vertices[10];
Euler::add_face(face, g);
face[1] = v_vertices[1]; face[0] = v_vertices[9]; face[2] = v_vertices[5];
Euler::add_face(face, g);
face[1] = v_vertices[5]; face[0] = v_vertices[4]; face[2] = v_vertices[11];
Euler::add_face(face, g);
face[1] = v_vertices[11]; face[0] = v_vertices[2]; face[2] = v_vertices[10];
Euler::add_face(face, g);
face[1] = v_vertices[10]; face[0] = v_vertices[6]; face[2] = v_vertices[7];
Euler::add_face(face, g);
face[1] = v_vertices[7]; face[0] = v_vertices[8]; face[2] = v_vertices[1];
Euler::add_face(face, g);
face[1] = v_vertices[3]; face[0] = v_vertices[4]; face[2] = v_vertices[9];
Euler::add_face(face, g);
face[1] = v_vertices[3]; face[0] = v_vertices[2]; face[2] = v_vertices[4];
Euler::add_face(face, g);
face[1] = v_vertices[3]; face[0] = v_vertices[6]; face[2] = v_vertices[2];
Euler::add_face(face, g);
face[1] = v_vertices[3]; face[0] = v_vertices[8]; face[2] = v_vertices[6];
Euler::add_face(face, g);
face[1] = v_vertices[3]; face[0] = v_vertices[9]; face[2] = v_vertices[8];
Euler::add_face(face, g);
face[1] = v_vertices[4]; face[0] = v_vertices[5]; face[2] = v_vertices[9];
Euler::add_face(face, g);
face[1] = v_vertices[2]; face[0] = v_vertices[11]; face[2] = v_vertices[4];
Euler::add_face(face, g);
face[1] = v_vertices[6]; face[0] = v_vertices[10]; face[2] = v_vertices[2];
Euler::add_face(face, g);
face[1] = v_vertices[8]; face[0] = v_vertices[7]; face[2] = v_vertices[6];
Euler::add_face(face, g);
face[1] = v_vertices[9]; face[0] = v_vertices[1]; face[2] = v_vertices[8];
Euler::add_face(face, g);
return halfedge(v_vertices[1], v_vertices[0], g).first;
}
/*!
* \ingroup PkgBGLHelperFct
*
* \brief Creates a row major ordered grid with `i` cells along the width and `j` cells
* along the height and adds it to the graph `g`.
* An internal property map for `CGAL::vertex_point_t` must be available in `Graph`.
*
* \param i the number of cells along the width.
* \param j the number of cells along the height.
* \param g the graph in which the grid will be created.
* \param calculator the functor that will assign coordinates to the grid vertices.
* \param triangulated decides if a cell is composed of one quad or two triangles.
* If `triangulated` is `true`, the diagonal of each cell is oriented from (0,0) to (1,1)
* in the cell coordinates.
*
*\tparam CoordinateFunctor a function object providing `Point_3 operator()(size_type I, size_type J)` with `Point_3` being
* the value_type of the internal property_map for `CGAL::vertex_point_t`.
* and outputs a `boost::property_traits<boost::property_map<Graph,CGAL::vertex_point_t>::%type>::%value_type`.
* It will be called with arguments (`w`, `h`), with `w` in [0..`i`] and `h` in [0..`j`].
* <p>%Default: a point with positive integer coordinates (`w`, `h`, 0), with `w` in [0..`i`] and `h` in [0..`j`]
*
* \returns the non-border non-diagonal halfedge that has the target vertex associated with the first point of the grid (default is (0,0,0) ).
*/
template<class Graph, class CoordinateFunctor>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_grid(typename boost::graph_traits<Graph>::vertices_size_type i,
typename boost::graph_traits<Graph>::vertices_size_type j,
Graph& g,
const CoordinateFunctor& calculator,
bool triangulated = false)
{
typedef typename boost::property_map<Graph,vertex_point_t>::type Point_property_map;
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typename boost::graph_traits<Graph>::vertices_size_type w(i+1), h(j+1);
Point_property_map vpmap = get(CGAL::vertex_point, g);
//create the vertices
std::vector<vertex_descriptor> v_vertices;
v_vertices.resize(static_cast<std::size_t>(w*h));
for(std::size_t k = 0; k < v_vertices.size(); ++k)
v_vertices[k] = add_vertex(g);
//assign the coordinates
for(typename boost::graph_traits<Graph>::vertices_size_type a=0; a<w; ++a)
for(typename boost::graph_traits<Graph>::vertices_size_type b=0; b<h; ++b)
put(vpmap, v_vertices[a+w*b], calculator(a,b));
//create the faces
std::vector<vertex_descriptor> face;
if(triangulated)
face.resize(3);
else
face.resize(4);
for(typename boost::graph_traits<Graph>::vertices_size_type a = 0; a<w-1; ++a)
{
for(typename boost::graph_traits<Graph>::vertices_size_type b = 0; b<h-1; ++b)
{
if(triangulated)
{
face[0] = v_vertices[w*b+a];
face[1] = v_vertices[w*b+a+1];
face[2] = v_vertices[w*(b+1)+a];
Euler::add_face(face, g);
face[0] = v_vertices[w*b+a+1];
face[1] = v_vertices[w*(b+1)+a+1];
face[2] = v_vertices[w*(b+1)+a];
Euler::add_face(face, g);
}
else
{
face[0] = v_vertices[w*b+ a];
face[1] = v_vertices[w*b+ a+1];
face[2] = v_vertices[w*(b+1)+ a+1];
face[3] = v_vertices[w*(b+1)+ a];
Euler::add_face(face, g);
}
}
}
return halfedge(v_vertices[1], v_vertices[0], g).first;
}
template<class Graph>
typename boost::graph_traits<Graph>::halfedge_descriptor
make_grid(typename boost::graph_traits<Graph>::vertices_size_type w,
typename boost::graph_traits<Graph>::vertices_size_type h,
Graph& g,
bool triangulated = false)
{
typedef typename boost::graph_traits<Graph>::vertices_size_type Size_type;
typedef typename boost::property_traits<typename boost::property_map<Graph, vertex_point_t>::type>::value_type Point;
return make_grid(w, h, g, internal::Default_grid_maker<Size_type, Point>(), triangulated);
}
} // namespace CGAL
// Here at the bottom because helpers.h must include generators (for backward compatibility reasons),
// and Euler_operations.h needs helpers.h
#include <CGAL/boost/graph/Euler_operations.h>
#endif // CGAL_BOOST_GRAPH_GENERATORS_H

View File

@ -19,7 +19,7 @@
// Author(s) : Andreas Fabri, Philipp Moeller
// include this to avoid a VC15 warning
#include <CGAL/boost/graph/named_function_params.h>
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/properties.hpp>

Some files were not shown because too many files have changed in this diff Show More