mirror of https://github.com/CGAL/cgal
Merge 'cgal/master' into Triangulation_3-CDT_3-lrineau
This commit is contained in:
commit
6b97b34a10
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
/*!
|
||||
\addtogroup PkgAlgebraicFoundationsRef
|
||||
\todo check generated documentation
|
||||
|
||||
\cgalPkgDescriptionBegin{Algebraic Foundations,PkgAlgebraicFoundations}
|
||||
\cgalPkgPicture{Algebraic_foundations2.png}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
#include <CGAL/Kernel/Same_uncertainty.h>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
CGAL_NTS_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
/*!
|
||||
\addtogroup PkgAlgebraicKernelDRef
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{Algebraic Kernel,PkgAlgebraicKernelD}
|
||||
\cgalPkgPicture{Algebraic_kernel_d.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -1442,7 +1442,7 @@ Alpha_shape_2<Dt,EACT>::find_alpha_solid() const
|
|||
// takes O(#alpha_shape) time
|
||||
Type_of_alpha alpha_solid = 0;
|
||||
|
||||
if (number_of_vertices()<3) return alpha_solid;
|
||||
if (dimension()!=2) return alpha_solid;
|
||||
|
||||
Finite_vertices_iterator vertex_it;
|
||||
// only finite vertices
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ template <typename Cb>
|
|||
class Cell_base_with_timestamp
|
||||
: public Cb
|
||||
{
|
||||
std::size_t time_stamp_;
|
||||
std::size_t time_stamp_ = std::size_t(-2);
|
||||
|
||||
public:
|
||||
using Has_timestamp = CGAL::Tag_true;
|
||||
|
|
@ -112,7 +112,7 @@ public:
|
|||
public:
|
||||
template <typename... Args>
|
||||
Cell_base_with_timestamp(const Args&... args)
|
||||
: Cb(args...), time_stamp_(-1)
|
||||
: Cb(args...)
|
||||
{ }
|
||||
|
||||
Cell_base_with_timestamp(const Cell_base_with_timestamp& other)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
/// \ingroup PkgApolloniusGraph2Ref
|
||||
/*!
|
||||
\addtogroup PkgApolloniusGraph2Ref
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{2D Apollonius Graphs (Delaunay Graphs of Disks),PkgApolloniusGraph2}
|
||||
\cgalPkgPicture{CircleVoronoi.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -16,27 +16,24 @@ find_package(Qt6 QUIET COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets Xml)
|
|||
find_package(CGAL COMPONENTS Qt6)
|
||||
find_package(nlohmann_json QUIET 3.9)
|
||||
|
||||
if (NOT CGAL_FOUND OR NOT CGAL_Qt6_FOUND OR NOT Qt6_FOUND OR NOT Boost_FOUND OR NOT nlohmann_json_FOUND)
|
||||
if (NOT CGAL_FOUND)
|
||||
set(MISSING_DEPS "the CGAL library, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT CGAL_Qt6_FOUND)
|
||||
set(MISSING_DEPS "the CGAL Qt6 component, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT Qt6_FOUND)
|
||||
set(MISSING_DEPS "the Qt6 library, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT Boost_FOUND)
|
||||
set(MISSING_DEPS "the Boost library, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT nlohmann_json_FOUND)
|
||||
set(MISSING_DEPS "JSON for Modern C++ 3.9+ (know as nlohmann_json), ${MISSING_DEPS}")
|
||||
endif()
|
||||
|
||||
message(STATUS "NOTICE: This project requires ${MISSING_DEPS} and will not be compiled.")
|
||||
return()
|
||||
set(MISSING_DEPS "")
|
||||
if (NOT CGAL_FOUND)
|
||||
set(MISSING_DEPS "the CGAL library, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT CGAL_Qt6_FOUND)
|
||||
set(MISSING_DEPS "the CGAL Qt6 component, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT Qt6_FOUND)
|
||||
set(MISSING_DEPS "the Qt6 library, ${MISSING_DEPS}")
|
||||
endif()
|
||||
if (NOT nlohmann_json_FOUND)
|
||||
set(MISSING_DEPS "JSON for Modern C++ 3.9+ (know as nlohmann_json), ${MISSING_DEPS}")
|
||||
endif()
|
||||
|
||||
if (MISSING_DEPS)
|
||||
message(STATUS "NOTICE: This project requires ${MISSING_DEPS}and will not be compiled.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
add_compile_definitions(QT_NO_VERSION_TAGGING)
|
||||
|
|
|
|||
|
|
@ -973,6 +973,7 @@ public:
|
|||
* u_1\f$ to \f$ u_2\f$.
|
||||
* \pre `e1` and `e2` share a common end-vertex, such that the two other
|
||||
* end-vertices of the two edges are associated with `c`'s endpoints.
|
||||
* \pre `e1` and `e2` have the same direction.
|
||||
*/
|
||||
Halfedge_handle merge_edge(Halfedge_handle e1,
|
||||
Halfedge_handle e2,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ namespace ArrTraits {}
|
|||
|
||||
/*!
|
||||
\addtogroup PkgArrangementOnSurface2Ref
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{2D Arrangements,PkgArrangementOnSurface2}
|
||||
\cgalPkgPicture{Arrangement_2.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ int main ()
|
|||
|
||||
#else
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
#include <CGAL/Arr_algebraic_segment_traits_2.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ int main ()
|
|||
}
|
||||
#else
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
#include <CGAL/Arr_algebraic_segment_traits_2.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_batched_point_location.h>
|
||||
|
||||
#include "arr_inexact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_vertical_decomposition_2.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_naive_point_location.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Associating a color attribute with segments using the consolidated
|
||||
// curve-data traits.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/curve_history.cpp
|
||||
// Constructing an arrangement with curve history.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arrangement_with_history_2.h>
|
||||
#include <CGAL/Arr_trapezoid_ric_point_location.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/dcel_extension.cpp
|
||||
// Extending all DCEL records (vertices, edges and faces).
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <fstream>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/IO/Arr_iostream.h>
|
||||
#include <CGAL/IO/Arr_text_formatter.h>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_curve_data_traits_2.h>
|
||||
|
||||
#include "arr_linear.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
|
||||
// Removing curves and manipulating edges in an arrangement with history.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arrangement_with_history_2.h>
|
||||
#include <CGAL/Arr_walk_along_line_point_location.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/draw_arrangement_2.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/face_extension.cpp
|
||||
// Extending the arrangement-face records.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arr_observer.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_overlay_2.h>
|
||||
#include <CGAL/Arr_default_overlay_traits.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Associating a name attribute with segments using the generic curve-data
|
||||
// traits.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_curve_data_traits_2.h>
|
||||
|
||||
#include "arr_polylines.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/draw_arrangement_2.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/incremental_insertion.cpp
|
||||
// Using the global incremental insertion functions.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_naive_point_location.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <fstream>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/IO/Arr_iostream.h>
|
||||
|
||||
#include "arr_inexact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <fstream>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arrangement_with_history_2.h>
|
||||
#include <CGAL/IO/Arr_with_history_iostream.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <list>
|
||||
#include <fstream>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/IO/Arr_iostream.h>
|
||||
|
||||
#include "arr_linear.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/draw_arrangement_2.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/observer.cpp
|
||||
// Using a simple arrangement observer.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_observer.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/overlay.cpp
|
||||
// A simple overlay of two arrangements.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_overlay_2.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arr_overlay_2.h>
|
||||
#include <CGAL/Arr_default_overlay_traits.h>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arr_overlay_2.h>
|
||||
#include <CGAL/Arr_default_overlay_traits.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifdef CGAL_USE_CORE
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/draw_arrangement_2.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/point_location.cpp
|
||||
// Answering point-location queries.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_naive_point_location.h>
|
||||
#include <CGAL/Arr_landmarks_point_location.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ int main() {
|
|||
|
||||
#else
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_polycurve_traits_2.h>
|
||||
|
||||
#include "arr_Bezier.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ int main() {
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/CORE_algebraic_number_traits.h>
|
||||
#include <CGAL/Arr_polycurve_traits_2.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ int main() {
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_polycurve_traits_2.h>
|
||||
|
||||
#include "arr_conics.h"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
#include <list>
|
||||
#include <chrono>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
|
||||
#include "arr_exact_construction_segments.h"
|
||||
#include "arr_print.h"
|
||||
#include "read_objects.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/spherical_overlay.cpp
|
||||
// Overlay of two arrangements embedded on the sphere.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_overlay_2.h>
|
||||
#include <CGAL/Arr_default_overlay_traits.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_tracing_traits_2.h>
|
||||
#include <CGAL/Arr_counting_traits_2.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_vertical_decomposition_2.h>
|
||||
|
||||
#include "arr_linear.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! \file examples/Arrangement_on_surface_2/ex_vertical_ray_shooting.cpp
|
||||
// Answering vertical ray-shooting queries.
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arr_walk_along_line_point_location.h>
|
||||
#include <CGAL/Arr_trapezoid_ric_point_location.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ public:
|
|||
m_object(base.construct_opposite_2_object()), m_counter(counter) {}
|
||||
|
||||
/*! operates */
|
||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xc)
|
||||
X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) const
|
||||
{ ++m_counter; return m_object(xc); }
|
||||
};
|
||||
|
||||
|
|
@ -429,7 +429,7 @@ public:
|
|||
m_object(base.compare_endpoints_xy_2_object()), m_counter(counter) {}
|
||||
|
||||
/*! operates */
|
||||
Comparison_result operator()(const X_monotone_curve_2& xc)
|
||||
Comparison_result operator()(const X_monotone_curve_2& xc) const
|
||||
{ ++m_counter; return m_object(xc); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -40,24 +40,24 @@ namespace CGAL {
|
|||
|
||||
inline void* _clean_pointer(const void* p)
|
||||
{
|
||||
static_assert(sizeof(void*) == sizeof(size_t));
|
||||
const size_t mask = ~1;
|
||||
const size_t val = (reinterpret_cast<size_t>(p) & mask);
|
||||
static_assert(sizeof(void*) == sizeof(std::size_t));
|
||||
const std::size_t mask = ~1;
|
||||
const std::size_t val = (reinterpret_cast<std::size_t>(p) & mask);
|
||||
|
||||
return (reinterpret_cast<void*>(val));
|
||||
}
|
||||
|
||||
inline void* _set_lsb(const void* p)
|
||||
{
|
||||
const size_t mask = 1;
|
||||
const size_t val = (reinterpret_cast<size_t>(p) | mask);
|
||||
const std::size_t mask = 1;
|
||||
const std::size_t val = (reinterpret_cast<std::size_t>(p) | mask);
|
||||
return (reinterpret_cast<void*>( val));
|
||||
}
|
||||
|
||||
inline bool _is_lsb_set(const void* p)
|
||||
{
|
||||
const size_t mask = 1;
|
||||
const size_t val = reinterpret_cast<size_t>(p);
|
||||
const std::size_t mask = 1;
|
||||
const std::size_t val = reinterpret_cast<std::size_t>(p);
|
||||
return ((val & mask) != 0);
|
||||
}
|
||||
|
||||
|
|
@ -565,7 +565,7 @@ public:
|
|||
Outer_ccb_const_iterator;
|
||||
|
||||
/*! obtains the number of outer CCBs the face has. */
|
||||
size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); }
|
||||
std::size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); }
|
||||
|
||||
/*! obtains an iterator for the first outer CCB of the face. */
|
||||
Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); }
|
||||
|
|
@ -601,7 +601,7 @@ public:
|
|||
typedef Inner_ccb_const_iterator Hole_const_iterator;
|
||||
|
||||
/*! obtains the number of inner CCBs the face has. */
|
||||
size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); }
|
||||
std::size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); }
|
||||
|
||||
/*! obtains an iterator for the first inner CCB of the face. */
|
||||
Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); }
|
||||
|
|
@ -646,7 +646,7 @@ public:
|
|||
}
|
||||
|
||||
// Backward compatibility:
|
||||
size_t number_of_holes() const { return number_of_inner_ccbs(); }
|
||||
std::size_t number_of_holes() const { return number_of_inner_ccbs(); }
|
||||
Hole_iterator holes_begin() { return inner_ccbs_begin(); }
|
||||
Hole_iterator holes_end() { return inner_ccbs_end(); }
|
||||
Hole_const_iterator holes_begin() const { return inner_ccbs_begin(); }
|
||||
|
|
@ -669,7 +669,7 @@ public:
|
|||
Isolated_vertex_const_iterator;
|
||||
|
||||
/*! obtains the number of isloated vertices inside the face. */
|
||||
size_t number_of_isolated_vertices() const
|
||||
std::size_t number_of_isolated_vertices() const
|
||||
{ return (this->iso_verts.size()); }
|
||||
|
||||
/*! obtains an iterator for the first isloated vertex inside the face. */
|
||||
|
|
@ -986,13 +986,13 @@ protected:
|
|||
typedef In_place_list<Inner_ccb, false> Inner_ccb_list;
|
||||
typedef In_place_list<Isolated_vertex, false> Iso_vert_list;
|
||||
|
||||
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;
|
||||
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
|
||||
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;
|
||||
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;
|
||||
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
|
||||
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;
|
||||
|
||||
public:
|
||||
typedef typename Halfedge_list::size_type Size;
|
||||
|
|
@ -1002,7 +1002,6 @@ public:
|
|||
typedef std::bidirectional_iterator_tag iterator_category;
|
||||
|
||||
protected:
|
||||
|
||||
Vertex_list vertices; // The vertices container.
|
||||
Halfedge_list halfedges; // The halfedges container.
|
||||
Face_list faces; // The faces container.
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@ public:
|
|||
|
||||
template <typename Point_>
|
||||
struct rebind {
|
||||
using Point_2 = Point_;
|
||||
using other = typename Vertex_base::template rebind<Point_2>;
|
||||
using Pnt = Point_;
|
||||
using Rebind_vertex_base = typename Vertex_base::template rebind<Pnt>;
|
||||
using Other_vertex_base = typename Rebind_vertex_base::other;
|
||||
using other = Arr_extended_vertex<Other_vertex_base, Vertex_data>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -101,8 +103,10 @@ public:
|
|||
|
||||
template <typename XMonotoneCurve>
|
||||
struct rebind {
|
||||
using X_monotonote_curve_2 = XMonotoneCurve;
|
||||
using other = typename Halfedge_base::template rebind<X_monotonote_curve_2>;
|
||||
using Xcv = XMonotoneCurve;
|
||||
using Rebind_halfedge_base = typename Halfedge_base::template rebind<Xcv>;
|
||||
using Other_halfedge_base = typename Rebind_halfedge_base::other;
|
||||
using other = Arr_extended_halfedge<Other_halfedge_base, Halfedge_data>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ public:
|
|||
// vertex to the extended point.
|
||||
if (! vh->is_at_open_boundary() && m_base_equal(base_p, vh->point()))
|
||||
return (Point_2(base_p, vh));
|
||||
else return (Point_2(base_p));
|
||||
return (Point_2(base_p));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ public:
|
|||
// vertex to the extended point.
|
||||
if (! vh->is_at_open_boundary() && m_base_equal(base_p, vh->point()))
|
||||
return (Point_2(base_p, vh));
|
||||
else return (Point_2(base_p));
|
||||
return (Point_2(base_p));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ boost::graph_traits<Graph>::edge_iterator ei;
|
|||
Algorithms obtain incidence information in graphs with the help of global
|
||||
functions such as:
|
||||
- `std::pair<vertex_iterator,vertex_iterator> vertices(const Graph& g);` to obtain an iterator range providing access to all the vertices, or
|
||||
- `int num_vertices(const Graph&);` to obtain the number of vertices of a graph, or
|
||||
- `vertices_size_type num_vertices(const Graph&);` to obtain the number of vertices of a graph, or
|
||||
- `vertex_descriptor source(edge_descriptor, const Graph&);` to obtain the source vertex of an edge.
|
||||
|
||||
Note, that the way we have written the types is a simplification; in reality,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@ faces(const FaceListGraph& g);
|
|||
This is the case for implementations only marking faces deleted in the face container.
|
||||
*/
|
||||
template <typename FaceListGraph>
|
||||
boost::graph_traits<FaceListGraph>::face_size_type
|
||||
boost::graph_traits<FaceListGraph>::faces_size_type
|
||||
num_faces(const FaceListGraph& g);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@ halfedges(const HalfedgeListGraph& g);
|
|||
This is the case for implementations only marking halfedges deleted in the halfedge container.
|
||||
*/
|
||||
template <typename HalfedgeListGraph>
|
||||
boost::graph_traits<HalfedgeListGraph>::halfedge_size_type
|
||||
boost::graph_traits<HalfedgeListGraph>::halfedges_size_type
|
||||
num_halfedges(const HalfedgeListGraph& g);
|
||||
|
||||
|
|
|
|||
|
|
@ -741,6 +741,7 @@ user might encounter.
|
|||
- `CGAL::Euler::join_vertex()`
|
||||
- `CGAL::Euler::make_hole()`
|
||||
- `CGAL::Euler::remove_center_vertex()`
|
||||
- `CGAL::Euler::remove_degree_2_vertex()`
|
||||
- `CGAL::Euler::remove_face()`
|
||||
- `CGAL::Euler::split_edge()`
|
||||
- `CGAL::Euler::split_face()`
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ int main(int argc, char** argv)
|
|||
// Here we start at an arbitrary vertex
|
||||
// Any other vertex could be the starting point
|
||||
vertex_iterator vb, ve;
|
||||
boost::tie(vb,ve)=vertices(lcc);
|
||||
std::tie(vb,ve)=vertices(lcc);
|
||||
vertex_descriptor vd = *vb;
|
||||
|
||||
std::cout << "We compute distances to " << vd->point() << std::endl;
|
||||
|
|
@ -45,7 +45,7 @@ int main(int argc, char** argv)
|
|||
boost::on_tree_edge()))));
|
||||
|
||||
// Traverse all vertices and show at what distance they are
|
||||
for(boost::tie(vb,ve)=vertices(lcc); vb!=ve; ++vb)
|
||||
for(std::tie(vb,ve)=vertices(lcc); vb!=ve; ++vb)
|
||||
{
|
||||
vd = *vb;
|
||||
std::cout<<vd->point()<<" is "<<distance[vd->id()]<<" hops away."<<std::endl;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ OutputIterator adjacent_vertices_V2(const LCC& g,
|
|||
OutputIterator out)
|
||||
{
|
||||
halfedge_around_target_iterator hi, he;
|
||||
for(boost::tie(hi, he) = halfedges_around_target(halfedge(vd,g),g); hi != he; ++hi)
|
||||
for(std::tie(hi, he) = halfedges_around_target(halfedge(vd,g),g); hi != he; ++hi)
|
||||
{
|
||||
*out++ = source(*hi,g);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void kruskal(const LCC& lcc)
|
|||
"point [ \n";
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb,ve) = vertices(lcc); vb!=ve; ++vb){
|
||||
for(std::tie(vb,ve) = vertices(lcc); vb!=ve; ++vb){
|
||||
std::cout << (*vb)->point() << "\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
|||
typedef typename boost::property_traits<NormalMap>::value_type normal;
|
||||
|
||||
face_iterator fb, fe;
|
||||
for(boost::tie(fb, fe) = faces(g); fb != fe; ++fb)
|
||||
for(std::tie(fb, fe) = faces(g); fb != fe; ++fb)
|
||||
{
|
||||
halfedge_descriptor edg = halfedge(*fb, g);
|
||||
halfedge_descriptor edgb = edg;
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ void fct(const LCC& lcc)
|
|||
std::cout << vd->point() << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "boost::tie + std::for_each" << std::endl;
|
||||
std::cout << "std::tie + std::for_each" << std::endl;
|
||||
vertex_iterator vb, ve;
|
||||
|
||||
boost::tie(vb,ve) = vertices_range(lcc);
|
||||
std::tie(vb,ve) = vertices_range(lcc);
|
||||
std::for_each(vb,ve, Fct());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ int main(int argc, char** argv)
|
|||
typedef boost::transform_iterator<Source<LCC>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
||||
|
||||
halfedge_around_target_iterator hb,he;
|
||||
boost::tie(hb,he) = halfedges_around_target(halfedge(vd,lcc),lcc);
|
||||
std::tie(hb,he) = halfedges_around_target(halfedge(vd,lcc),lcc);
|
||||
adjacent_vertex_iterator avib, avie;
|
||||
avib = boost::make_transform_iterator(hb, Source<LCC>(lcc));
|
||||
avie = boost::make_transform_iterator(he, Source<LCC>(lcc));
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ int main(int argc, char** argv) {
|
|||
vertex_iterator vb, ve;
|
||||
int index = 0;
|
||||
|
||||
// boost::tie assigns the first and second element of the std::pair
|
||||
// std::tie assigns the first and second element of the std::pair
|
||||
// returned by boost::vertices to the variables vit and ve
|
||||
for(boost::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
for(std::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
vertex_descriptor vd = *vb;
|
||||
vd->id() = index++;
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
// Here we start at an arbitrary vertex
|
||||
// Any other vertex could be the starting point
|
||||
boost::tie(vb,ve)=vertices(P);
|
||||
std::tie(vb,ve)=vertices(P);
|
||||
vertex_descriptor vd = *vb;
|
||||
|
||||
std::cout << "We compute distances to " << vd->point() << std::endl;
|
||||
|
|
@ -54,7 +54,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
|
||||
// Traverse all vertices and show at what distance they are
|
||||
for(boost::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
for(std::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
vd = *vb;
|
||||
std::cout << vd->point() << " is " << distance[vd->id()] << " hops away" << std::endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ adjacent_vertices_V2(const Polyhedron& g,
|
|||
{
|
||||
halfedge_around_target_iterator hi, he;
|
||||
|
||||
for(boost::tie(hi, he) = halfedges_around_target(halfedge(vd,g),g); hi != he; ++hi)
|
||||
for(std::tie(hi, he) = halfedges_around_target(halfedge(vd,g),g); hi != he; ++hi)
|
||||
{
|
||||
*out++ = source(*hi,g);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ kruskal(const Polyhedron& P)
|
|||
vertex_iterator vb, ve;
|
||||
int index = 0;
|
||||
|
||||
// boost::tie assigns the first and second element of the std::pair
|
||||
// std::tie assigns the first and second element of the std::pair
|
||||
// returned by boost::vertices to the variables vb and ve
|
||||
for(boost::tie(vb, ve)=vertices(P); vb!=ve; ++vb){
|
||||
for(std::tie(vb, ve)=vertices(P); vb!=ve; ++vb){
|
||||
vertex_index_pmap[*vb]= index++;
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ kruskal(const Polyhedron& P)
|
|||
" coord Coordinate {\n"
|
||||
" point [ \n";
|
||||
|
||||
for(boost::tie(vb, ve) = vertices(P); vb!=ve; ++vb){
|
||||
for(std::tie(vb, ve) = vertices(P); vb!=ve; ++vb){
|
||||
std::cout << " " << (*vb)->point() << "\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ kruskal( const Polyhedron& P)
|
|||
"point [ \n";
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb,ve) = vertices(P); vb!=ve; ++vb){
|
||||
for(std::tie(vb,ve) = vertices(P); vb!=ve; ++vb){
|
||||
std::cout << (*vb)->point() << "\n";
|
||||
}
|
||||
|
||||
|
|
@ -75,9 +75,9 @@ int main() {
|
|||
vertex_iterator vb, ve;
|
||||
int index = 0;
|
||||
|
||||
// boost::tie assigns the first and second element of the std::pair
|
||||
// std::tie assigns the first and second element of the std::pair
|
||||
// returned by boost::vertices to the variables vit and ve
|
||||
for(boost::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
for(std::tie(vb,ve)=vertices(P); vb!=ve; ++vb ){
|
||||
vertex_descriptor vd = *vb;
|
||||
vd->id() = index++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
|||
typedef typename boost::property_traits<NormalMap>::value_type normal;
|
||||
|
||||
face_iterator fb, fe;
|
||||
for(boost::tie(fb, fe) = faces(g); fb != fe; ++fb)
|
||||
for(std::tie(fb, fe) = faces(g); fb != fe; ++fb)
|
||||
{
|
||||
halfedge_descriptor edg = halfedge(*fb, g);
|
||||
halfedge_descriptor edgb = edg;
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ void fct(const Polyhedron& p)
|
|||
std::cout << vd->point() << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "boost::tie + std::for_each" << std::endl;
|
||||
std::cout << "std::tie + std::for_each" << std::endl;
|
||||
vertex_iterator vb, ve;
|
||||
|
||||
boost::tie(vb,ve) = vertices_range(p);
|
||||
std::tie(vb,ve) = vertices_range(p);
|
||||
std::for_each(vb,ve, Fct());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int main(int argc, char** argv)
|
|||
typedef boost::transform_iterator<Source<Polyhedron>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
||||
|
||||
halfedge_around_target_iterator hb,he;
|
||||
boost::tie(hb,he) = halfedges_around_target(halfedge(vd,P),P);
|
||||
std::tie(hb,he) = halfedges_around_target(halfedge(vd,P),P);
|
||||
adjacent_vertex_iterator avib, avie;
|
||||
avib = boost::make_transform_iterator(hb, Source<Polyhedron>(P));
|
||||
avie = boost::make_transform_iterator(he, Source<Polyhedron>(P));
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ int main(int argc, char** argv)
|
|||
std::ofstream outxyz("out.xyz");
|
||||
outxyz.precision(17);
|
||||
boost::graph_traits<SM>::vertex_iterator vit, ve;
|
||||
boost::tie(vit, ve) = vertices(sm);
|
||||
std::tie(vit, ve) = vertices(sm);
|
||||
for(; vit!=ve; ++vit)
|
||||
{
|
||||
if(get(vertex_pid_map, *vit) == 0)
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ edge(typename boost::graph_traits<Dual<P> >::vertex_descriptor u,
|
|||
const Dual<P>& dual)
|
||||
{
|
||||
typename boost::graph_traits<Dual<P> >::out_edge_iterator e, e_end;
|
||||
for(boost::tie(e, e_end) = out_edges(u, dual); e != e_end; ++e) {
|
||||
for(std::tie(e, e_end) = out_edges(u, dual); e != e_end; ++e) {
|
||||
if(target(*e, dual) == v)
|
||||
return std::make_pair(*e, true);
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ halfedge(typename boost::graph_traits<Dual<P> >::vertex_descriptor u,
|
|||
const Dual<P>& dual)
|
||||
{
|
||||
typename boost::graph_traits<Dual<P> >::out_edge_iterator e, e_end;
|
||||
for(boost::tie(e, e_end) = out_edges(u, dual); e != e_end; ++e) {
|
||||
for(std::tie(e, e_end) = out_edges(u, dual); e != e_end; ++e) {
|
||||
if(target(*e, dual) == v)
|
||||
return std::make_pair(halfedge(*e, dual), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,6 @@
|
|||
#ifndef CGAL_EULER_OPERATIONS_H
|
||||
#define CGAL_EULER_OPERATIONS_H
|
||||
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <CGAL/boost/graph/properties.h>
|
||||
|
||||
|
|
@ -27,6 +23,10 @@
|
|||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
|
@ -136,7 +136,7 @@ join_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
|||
CGAL_assertion( halfedge(v_to_remove, v, g).first == h );
|
||||
|
||||
halfedge_around_vertex_iterator ieb, iee;
|
||||
for(boost::tie(ieb, iee) = halfedges_around_target(hop, g); ieb != iee; ++ieb) {
|
||||
for(std::tie(ieb, iee) = halfedges_around_target(hop, g); ieb != iee; ++ieb) {
|
||||
CGAL_assertion( target(*ieb,g) == v_to_remove);
|
||||
set_target(*ieb ,v , g);
|
||||
}
|
||||
|
|
@ -615,7 +615,7 @@ bool can_add_face(const VertexRange& vrange, const PMesh& sm)
|
|||
for(std::size_t i=0; i < N; ++i){
|
||||
halfedge_descriptor hd;
|
||||
bool found;
|
||||
boost::tie(hd,found) = halfedge(face[i],face[i+1],sm);
|
||||
std::tie(hd,found) = halfedge(face[i],face[i+1],sm);
|
||||
if(found && (! is_border(hd,sm))){
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1149,7 +1149,7 @@ void make_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
|||
|
||||
face_descriptor fd = face(h, g);
|
||||
halfedge_around_face_iterator hafib, hafie;
|
||||
for(boost::tie(hafib, hafie) = halfedges_around_face(h, g);
|
||||
for(std::tie(hafib, hafie) = halfedges_around_face(h, g);
|
||||
hafib != hafie;
|
||||
++hafib){
|
||||
CGAL_assertion(! is_border(opposite(*hafib,g),g));
|
||||
|
|
@ -1361,7 +1361,7 @@ add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_desc
|
|||
internal::set_border(he2,g);
|
||||
|
||||
CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
|
||||
for(boost::tie(hafib, hafie) = halfedges_around_face(ohe1, g);
|
||||
for(std::tie(hafib, hafie) = halfedges_around_face(ohe1, g);
|
||||
hafib != hafie;
|
||||
++hafib){
|
||||
set_face(*hafib, f, g);
|
||||
|
|
@ -1421,7 +1421,7 @@ add_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
|
|||
internal::set_border(newhop, g);
|
||||
|
||||
CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
|
||||
for(boost::tie(hafib, hafie) = halfedges_around_face(newh, g);
|
||||
for(std::tie(hafib, hafie) = halfedges_around_face(newh, g);
|
||||
hafib != hafie;
|
||||
++hafib){
|
||||
set_face(*hafib, f, g);
|
||||
|
|
@ -1458,7 +1458,7 @@ does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor
|
|||
// The following loop checks the link condition for v0_v1.
|
||||
// Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh.
|
||||
//
|
||||
for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ; eb1 != ee1 ; ++ eb1 )
|
||||
for ( std::tie(eb1,ee1) = halfedges_around_source(v0,g) ; eb1 != ee1 ; ++ eb1 )
|
||||
{
|
||||
halfedge_descriptor v0_k = *eb1;
|
||||
|
||||
|
|
@ -1466,7 +1466,7 @@ does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor
|
|||
{
|
||||
vertex_descriptor k = target(v0_k,g);
|
||||
|
||||
for ( boost::tie(eb2,ee2) = halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 )
|
||||
for ( std::tie(eb2,ee2) = halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 )
|
||||
{
|
||||
halfedge_descriptor k_v1 = *eb2;
|
||||
|
||||
|
|
@ -1866,10 +1866,95 @@ bool satisfies_link_condition(typename boost::graph_traits<Graph>::edge_descript
|
|||
}
|
||||
/// \endcond
|
||||
#endif
|
||||
|
||||
/**
|
||||
* removes the target vertex of `h`, merging its incident edges into a single edge linking
|
||||
* the two vertices adjacent to the vertex being removed.
|
||||
*
|
||||
* \tparam Graph must be a model of `MutableFaceGraph`
|
||||
*
|
||||
* \param h halfedge descriptor
|
||||
* \param g the graph
|
||||
*
|
||||
* \returns an halfedge linking the two vertices adjacent to the vertex being removed.
|
||||
*
|
||||
* \pre `degree(target(h, g), g) == 2`.
|
||||
*
|
||||
* \sa `remove_center_vertex()`
|
||||
*/
|
||||
|
||||
template <typename Graph>
|
||||
typename boost::graph_traits<Graph>::halfedge_descriptor
|
||||
remove_degree_2_vertex(const typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
||||
Graph& g)
|
||||
{
|
||||
typedef 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;
|
||||
|
||||
CGAL_precondition(degree(target(h, g), g) == 2);
|
||||
|
||||
vertex_descriptor v = target(h, g);
|
||||
halfedge_descriptor h1 = h;
|
||||
halfedge_descriptor h2 = opposite(next(h1, g), g);
|
||||
|
||||
if(is_border(h1, g))
|
||||
std::swap(h1, h2);
|
||||
|
||||
vertex_descriptor v1 = source(h1, g);
|
||||
vertex_descriptor v2 = source(h2, g);
|
||||
|
||||
bool exists;
|
||||
halfedge_descriptor huv;
|
||||
std::tie(huv, exists) = halfedge(v1, v2, g);
|
||||
|
||||
if(is_border(h2, g))
|
||||
{
|
||||
CGAL_assertion(!is_border(h1, g));
|
||||
|
||||
if(exists)
|
||||
{
|
||||
Euler::remove_face(h1, g);
|
||||
return huv;
|
||||
}
|
||||
else
|
||||
{
|
||||
halfedge_descriptor oh1 = opposite(h1, g);
|
||||
halfedge_descriptor nnh1 = next(next(h1, g), g);
|
||||
halfedge_descriptor ph2 = prev(h2, g);
|
||||
face_descriptor f1 = face(h1, g);
|
||||
|
||||
set_target(h1, v2, g);
|
||||
set_halfedge(v2, ph2, g);
|
||||
set_next(h1, nnh1, g);
|
||||
set_next(ph2, oh1, g);
|
||||
set_halfedge(f1, h1, g); // in case it was nh1
|
||||
|
||||
remove_edge(edge(h2, g), g);
|
||||
remove_vertex(v, g);
|
||||
|
||||
return h1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CGAL_assertion(!is_border(h1, g) && !is_border(h2, g));
|
||||
|
||||
halfedge_descriptor ph1 = prev(h1, g);
|
||||
halfedge_descriptor ph2 = prev(h2, g);
|
||||
Euler::remove_center_vertex(h, g);
|
||||
|
||||
if(exists)
|
||||
return huv;
|
||||
else
|
||||
return Euler::split_face(ph1, ph2, g);
|
||||
}
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
} // namespace Euler
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif /* CGAL_EULER_OPERATIONS_H */
|
||||
|
|
|
|||
|
|
@ -895,7 +895,7 @@ vertices(const Face_filtered_graph<Graph, FIMap, VIMap, HIMap> & w)
|
|||
|
||||
typename Face_filtered_graph<Graph, FIMap, VIMap, HIMap> ::Is_simplex_valid predicate(&w);
|
||||
g_vertex_iterator b,e;
|
||||
boost::tie(b,e) = vertices(w.graph());
|
||||
std::tie(b,e) = vertices(w.graph());
|
||||
return make_range(vertex_iterator(predicate, b, e),
|
||||
vertex_iterator(predicate, e, e));
|
||||
}
|
||||
|
|
@ -912,7 +912,7 @@ edges(const Face_filtered_graph<Graph, FIMap, VIMap, HIMap> & w)
|
|||
|
||||
typename Face_filtered_graph<Graph, FIMap, VIMap, HIMap> ::Is_simplex_valid predicate(&w);
|
||||
g_edge_iterator b,e;
|
||||
boost::tie(b,e) = edges(w.graph());
|
||||
std::tie(b,e) = edges(w.graph());
|
||||
return make_range(edge_iterator(predicate, b, e),
|
||||
edge_iterator(predicate, e, e));
|
||||
}
|
||||
|
|
@ -931,7 +931,7 @@ out_edges(typename boost::graph_traits<Face_filtered_graph<Graph, FIMap, VIMap,
|
|||
|
||||
typename Face_filtered_graph<Graph, FIMap, VIMap, HIMap> ::Is_simplex_valid predicate(&w);
|
||||
g_out_edge_iterator b,e;
|
||||
boost::tie(b,e) = out_edges(v, w.graph());
|
||||
std::tie(b,e) = out_edges(v, w.graph());
|
||||
return make_range(out_edge_iterator(predicate, b, e),
|
||||
out_edge_iterator(predicate, e, e));
|
||||
}
|
||||
|
|
@ -950,7 +950,7 @@ in_edges(typename boost::graph_traits<Face_filtered_graph<Graph, FIMap, VIMap, H
|
|||
|
||||
typename Face_filtered_graph<Graph, FIMap, VIMap, HIMap> ::Is_simplex_valid predicate(&w);
|
||||
g_in_edge_iterator b,e;
|
||||
boost::tie(b,e) = in_edges(v, w.graph());
|
||||
std::tie(b,e) = in_edges(v, w.graph());
|
||||
return make_range(in_edge_iterator(predicate, b, e),
|
||||
in_edge_iterator(predicate, e, e));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ edge(typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::ver
|
|||
CGAL_assertion(in_same_graph(v,w));
|
||||
bool b;
|
||||
g_edge_descriptor ed;
|
||||
boost::tie(ed,b) = edge(u.descriptor, v.descriptor, *w.graph);
|
||||
std::tie(ed,b) = edge(u.descriptor, v.descriptor, *w.graph);
|
||||
return std::make_pair(edge_descriptor(ed,*w.graph),b);
|
||||
}
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ CGAL::Iterator_range<typename boost::graph_traits<Graph_with_descriptor_with_gra
|
|||
vertices(const Graph_with_descriptor_with_graph<Graph> & w)
|
||||
{
|
||||
typename boost::graph_traits<Graph>::vertex_iterator b,e;
|
||||
boost::tie(b,e) = vertices(*w.graph);
|
||||
std::tie(b,e) = vertices(*w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::V2V(*w.graph)),
|
||||
boost::make_transform_iterator(e,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::V2V(*w.graph)));
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ CGAL::Iterator_range<typename boost::graph_traits<Graph_with_descriptor_with_gra
|
|||
edges(const Graph_with_descriptor_with_graph<Graph> & w)
|
||||
{
|
||||
typename boost::graph_traits<Graph>::edge_iterator b,e;
|
||||
boost::tie(b,e) = edges(*w.graph);
|
||||
std::tie(b,e) = edges(*w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)),
|
||||
boost::make_transform_iterator(e,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)));
|
||||
}
|
||||
|
|
@ -342,7 +342,7 @@ out_edges(typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >
|
|||
{
|
||||
CGAL_assertion(in_same_graph(v,w));
|
||||
typename boost::graph_traits<Graph>::out_edge_iterator b,e;
|
||||
boost::tie(b,e) = out_edges(v.descriptor, *w.graph);
|
||||
std::tie(b,e) = out_edges(v.descriptor, *w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)),
|
||||
boost::make_transform_iterator(e,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)));
|
||||
}
|
||||
|
|
@ -354,7 +354,7 @@ in_edges(typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >:
|
|||
{
|
||||
CGAL_assertion(in_same_graph(v,w));
|
||||
typename boost::graph_traits<Graph>::in_edge_iterator b,e;
|
||||
boost::tie(b,e) = in_edges(v.descriptor, *w.graph);
|
||||
std::tie(b,e) = in_edges(v.descriptor, *w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)),
|
||||
boost::make_transform_iterator(e,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::E2E(*w.graph)));
|
||||
}
|
||||
|
|
@ -557,7 +557,7 @@ halfedge(typename boost::graph_traits< Graph_with_descriptor_with_graph<Graph> >
|
|||
bool b;
|
||||
CGAL_assertion(in_same_graph(u,w));
|
||||
CGAL_assertion(in_same_graph(v,w));
|
||||
boost::tie(hd,b) = halfedge(u.descriptor, v.descriptor, *w.graph);
|
||||
std::tie(hd,b) = halfedge(u.descriptor, v.descriptor, *w.graph);
|
||||
return std::make_pair(halfedge_descriptor(hd,*w.graph),b);
|
||||
}
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ CGAL::Iterator_range<typename boost::graph_traits<Graph_with_descriptor_with_gra
|
|||
halfedges(const Graph_with_descriptor_with_graph<Graph> & w)
|
||||
{
|
||||
typename boost::graph_traits<Graph>::halfedge_iterator b,e;
|
||||
boost::tie(b,e) = halfedges(*w.graph);
|
||||
std::tie(b,e) = halfedges(*w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b, typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::H2H(*w.graph)),
|
||||
boost::make_transform_iterator(e, typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::H2H(*w.graph)));
|
||||
}
|
||||
|
|
@ -661,7 +661,7 @@ CGAL::Iterator_range<typename boost::graph_traits<Graph_with_descriptor_with_gra
|
|||
faces(const Graph_with_descriptor_with_graph<Graph> & w)
|
||||
{
|
||||
typename boost::graph_traits<Graph>::face_iterator b,e;
|
||||
boost::tie(b,e) = faces(*w.graph);
|
||||
std::tie(b,e) = faces(*w.graph);
|
||||
return std::make_pair(boost::make_transform_iterator(b,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::F2F(*w.graph)),
|
||||
boost::make_transform_iterator(e,typename boost::graph_traits<Graph_with_descriptor_with_graph<Graph> >::F2F(*w.graph)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void partition_dual_graph(const TriangleMesh& tm,
|
|||
|
||||
// fill the adjacency info
|
||||
face_iterator fit, fe;
|
||||
boost::tie(fit, fe) = faces(tm);
|
||||
std::tie(fit, fe) = faces(tm);
|
||||
for(int i=0, j=0; fit!=fe; ++fit, ++i)
|
||||
{
|
||||
eptr[i] = j;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct Output_vertex_partition_ids
|
|||
VertexPartitionIDPmap vertex_partition_id_map)
|
||||
{
|
||||
typename boost::graph_traits<TriangleMesh>::vertex_iterator vit, ve;
|
||||
boost::tie(vit, ve) = vertices(tm);
|
||||
std::tie(vit, ve) = vertices(tm);
|
||||
for(; vit!=ve; ++vit)
|
||||
put(vertex_partition_id_map, *vit, npart[get(indices, *vit)]);
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ struct Output_face_partition_ids
|
|||
FacePartitionIDPmap face_partition_id_map)
|
||||
{
|
||||
typename boost::graph_traits<TriangleMesh>::face_iterator fit, fe;
|
||||
boost::tie(fit, fe) = faces(tm);
|
||||
std::tie(fit, fe) = faces(tm);
|
||||
for(int i=0; fit!=fe; ++fit, ++i)
|
||||
put(face_partition_id_map, *fit, epart[i]);
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ void partition_graph(const TriangleMesh& tm,
|
|||
|
||||
// fill the adjacency info
|
||||
face_iterator fit, fe;
|
||||
boost::tie(fit, fe) = faces(tm);
|
||||
std::tie(fit, fe) = faces(tm);
|
||||
for(int i=0, j=0; fit!=fe; ++fit, ++i)
|
||||
{
|
||||
eptr[i] = j;
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public:
|
|||
// initialize vertex indices, it is necessary since we are using VertexList = listS
|
||||
Vertex_iterator v_begin, v_end;
|
||||
Traits::vertices_size_type index = 0;
|
||||
for(boost::tie(v_begin, v_end) = vertices(graph); v_begin != v_end; ++v_begin) {
|
||||
for(std::tie(v_begin, v_end) = vertices(graph); v_begin != v_end; ++v_begin) {
|
||||
boost::put(boost::vertex_index, graph, *v_begin, index++);
|
||||
}
|
||||
}
|
||||
|
|
@ -269,8 +269,8 @@ public:
|
|||
Edge_descriptor v1_v2, v2_v1;
|
||||
bool v1_v2_added, v2_v1_added;
|
||||
|
||||
boost::tie(v1_v2, v1_v2_added) = boost::add_edge(v1, v2, graph);
|
||||
boost::tie(v2_v1, v2_v1_added) = boost::add_edge(v2, v1, graph);
|
||||
std::tie(v1_v2, v1_v2_added) = boost::add_edge(v1, v2, graph);
|
||||
std::tie(v2_v1, v2_v1_added) = boost::add_edge(v2, v1, graph);
|
||||
|
||||
CGAL_assertion(v1_v2_added && v2_v1_added);
|
||||
//put edge capacities
|
||||
|
|
@ -360,7 +360,7 @@ public:
|
|||
// however from our edge_map, we know that each (2i, 2i + 1) is reverse pairs, how to facilitate that ?
|
||||
// will look it back
|
||||
Graph::edge_iterator ei, ee;
|
||||
for(boost::tie(ei, ee) = boost::edges(graph); ei != ee; ++ei) {
|
||||
for(std::tie(ei, ee) = boost::edges(graph); ei != ee; ++ei) {
|
||||
Graph::vertex_descriptor v1 = boost::source(*ei, graph);
|
||||
Graph::vertex_descriptor v2 = boost::target(*ei, graph);
|
||||
std::pair<Graph::edge_descriptor, bool> opp_edge = boost::edge(v2, v1, graph);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ is_border(typename boost::graph_traits<FaceGraph>::vertex_descriptor vd,
|
|||
const FaceGraph& g)
|
||||
{
|
||||
CGAL::Halfedge_around_target_iterator<FaceGraph> havib, havie;
|
||||
for(boost::tie(havib, havie) = halfedges_around_target(halfedge(vd, g), g); havib != havie; ++havib) {
|
||||
for(std::tie(havib, havie) = halfedges_around_target(halfedge(vd, g), g); havib != havie; ++havib) {
|
||||
if(is_border(*havib,g)) {
|
||||
typename boost::graph_traits<FaceGraph>::halfedge_descriptor h = *havib;
|
||||
return h;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void duplicate_terminal_vertices(Graph& graph,
|
|||
typedef typename boost::graph_traits<Graph>::out_edge_iterator out_edge_iterator;
|
||||
|
||||
vertex_iterator b,e;
|
||||
boost::tie(b,e) = vertices(graph);
|
||||
std::tie(b,e) = vertices(graph);
|
||||
std::vector<vertex_descriptor> V(b,e);
|
||||
for(vertex_descriptor v : V)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ void duplicate_terminal_vertices(Graph& graph,
|
|||
if (deg != 2 || is_terminal(orig_v, orig))
|
||||
{
|
||||
out_edge_iterator b, e;
|
||||
boost::tie(b, e) = out_edges(v, graph);
|
||||
std::tie(b, e) = out_edges(v, graph);
|
||||
std::vector<edge_descriptor> out_edges_of_v(b, e);
|
||||
for (unsigned int i = 1; i < out_edges_of_v.size(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
OFF
|
||||
29 19 0
|
||||
|
||||
0 0 0
|
||||
0.20000000000000001 0 0
|
||||
0.40000000000000002 0 0
|
||||
0.59999999999999998 0 0
|
||||
0.80000000000000004 0 0
|
||||
1 0 0
|
||||
0 0.20000000000000001 0
|
||||
0.20000000000000001 0.20000000000000001 0
|
||||
0 1 0
|
||||
0.59999999999999998 0.20000000000000001 0
|
||||
0.80000000000000004 0.20000000000000001 0
|
||||
1 0.20000000000000001 0
|
||||
0 0.40000000000000002 0
|
||||
0.20000000000000001 1 0
|
||||
0.40000000000000002 0.40000000000000002 0
|
||||
0.59999999999999998 0.40000000000000002 0
|
||||
1 1 0
|
||||
1 0.40000000000000002 0
|
||||
0 0.59999999999999998 0
|
||||
1 0.80000000000000004 0
|
||||
0.59999999999999998 1 0
|
||||
0.59999999999999998 0.59999999999999998 0
|
||||
0.80000000000000004 1 0
|
||||
1 0.59999999999999998 0
|
||||
0 0.80000000000000004 0
|
||||
0.20000000000000001 0.80000000000000004 0
|
||||
0.40000000000000002 1 0
|
||||
0.59999999999999998 0.80000000000000004 0
|
||||
0.80000000000000004 0.80000000000000004 0
|
||||
4 1 7 6 0
|
||||
3 28 19 22
|
||||
3 6 7 12
|
||||
3 4 10 9
|
||||
3 3 4 9
|
||||
3 27 20 26
|
||||
3 9 15 14
|
||||
3 5 11 10
|
||||
3 24 25 8
|
||||
3 25 13 8
|
||||
3 1 2 7
|
||||
8 17 23 28 27 21 15 10 11
|
||||
3 9 10 15
|
||||
3 19 16 22
|
||||
12 25 24 18 12 7 2 3 9 14 15 21 27
|
||||
3 4 5 10
|
||||
3 28 22 20
|
||||
3 27 28 20
|
||||
3 23 19 28
|
||||
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
|
||||
#include "test_Prefix.h"
|
||||
#include <boost/range/distance.hpp>
|
||||
|
||||
#include <CGAL/boost/graph/Euler_operations.h>
|
||||
#include <CGAL/boost/graph/generators.h>
|
||||
#include <CGAL/boost/graph/copy_face_graph.h>
|
||||
#include <CGAL/boost/graph/named_params_helper.h>
|
||||
#include <CGAL/Polygon_mesh_processing/border.h>
|
||||
|
||||
#include <CGAL/IO/OFF.h>
|
||||
#include <CGAL/Polygon_mesh_processing/border.h>
|
||||
#include <CGAL/boost/graph/copy_face_graph.h>
|
||||
|
||||
#include <boost/range/distance.hpp>
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
|
|
@ -97,7 +100,7 @@ join_face_test()
|
|||
|
||||
bool found;
|
||||
halfedge_descriptor e;
|
||||
boost::tie(e, found) = halfedge(f.w, f.v, f.m);
|
||||
std::tie(e, found) = halfedge(f.w, f.v, f.m);
|
||||
assert(found);
|
||||
// manually set the halfedge of f.f1 to the edge that is to be
|
||||
// removed to provoke a special case
|
||||
|
|
@ -108,7 +111,7 @@ join_face_test()
|
|||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||
|
||||
CGAL::Halfedge_around_face_iterator<T> begin, end;
|
||||
boost::tie(begin, end) = CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m);
|
||||
std::tie(begin, end) = CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m);
|
||||
assert(std::distance(begin, end) == 4);
|
||||
for(; begin != end; ++begin)
|
||||
{
|
||||
|
|
@ -119,7 +122,7 @@ join_face_test()
|
|||
}
|
||||
|
||||
face_iterator fit, fend;
|
||||
for(boost::tie(fit, fend) = faces(f.m); fit != fend; ++fit) {
|
||||
for(std::tie(fit, fend) = faces(f.m); fit != fend; ++fit) {
|
||||
assert(*fit == f.f1 || *fit == f.f3);
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +144,7 @@ remove_face_test_1()
|
|||
// find the edge between x and y
|
||||
bool found;
|
||||
halfedge_descriptor e;
|
||||
boost::tie(e, found) = halfedge(f.x, f.y, f.m);
|
||||
std::tie(e, found) = halfedge(f.x, f.y, f.m);
|
||||
assert(found);
|
||||
assert(face(e, f.m) == f.f3);
|
||||
|
||||
|
|
@ -156,7 +159,7 @@ remove_face_test_1()
|
|||
assert_EQUAL(CGAL::internal::exact_num_vertices(f.m) == 4);
|
||||
halfedge_iterator eb, ee;
|
||||
int count = 0;
|
||||
for(boost::tie(eb, ee) = halfedges(f.m); eb != ee; ++eb) {
|
||||
for(std::tie(eb, ee) = halfedges(f.m); eb != ee; ++eb) {
|
||||
if(face(*eb,f.m) == boost::graph_traits<T>::null_face())
|
||||
++count;
|
||||
}
|
||||
|
|
@ -177,9 +180,9 @@ remove_face_test_2()
|
|||
bool found;
|
||||
halfedge_descriptor e;
|
||||
|
||||
boost::tie(e, found) = halfedge(f.x, f.w, f.m);
|
||||
std::tie(e, found) = halfedge(f.x, f.w, f.m);
|
||||
assert(found);
|
||||
boost::tie(e, found) = halfedge(f.x, f.v, f.m);
|
||||
std::tie(e, found) = halfedge(f.x, f.v, f.m);
|
||||
assert(found);
|
||||
assert(face(e, f.m) == f.f1);
|
||||
CGAL::Euler::remove_face(e,f.m);
|
||||
|
|
@ -189,7 +192,7 @@ remove_face_test_2()
|
|||
assert(CGAL::internal::exact_num_edges(f.m) == 7);
|
||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||
|
||||
boost::tie(e, found) = halfedge(f.x, f.w, f.m);
|
||||
std::tie(e, found) = halfedge(f.x, f.w, f.m);
|
||||
assert(found);
|
||||
assert(face(e,f.m) == boost::graph_traits<T>::null_face());
|
||||
|
||||
|
|
@ -266,7 +269,7 @@ join_vertex_interior_test()
|
|||
halfedge_descriptor e;
|
||||
|
||||
bool found;
|
||||
boost::tie(e, found) = halfedge(f.w, f.x, f.m);
|
||||
std::tie(e, found) = halfedge(f.w, f.x, f.m);
|
||||
assert(found);
|
||||
CGAL::Euler::join_vertex(e,f.m);
|
||||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||
|
|
@ -289,7 +292,7 @@ join_vertex_exterior_test()
|
|||
Surface_fixture_3<T> f;
|
||||
halfedge_descriptor e;
|
||||
bool found;
|
||||
boost::tie(e, found) = halfedge(f.w, f.y, f.m);
|
||||
std::tie(e, found) = halfedge(f.w, f.y, f.m);
|
||||
assert(source(e,f.m) == f.w);
|
||||
assert(target(e,f.m) == f.y);
|
||||
assert(found);
|
||||
|
|
@ -307,7 +310,7 @@ join_vertex_exterior_test()
|
|||
Surface_fixture_3<T> f;
|
||||
halfedge_descriptor e;
|
||||
bool found;
|
||||
boost::tie(e, found) = halfedge(f.y, f.w, f.m);
|
||||
std::tie(e, found) = halfedge(f.y, f.w, f.m);
|
||||
|
||||
assert(source(e,f.m) == f.y);
|
||||
assert(target(e,f.m) == f.w);
|
||||
|
|
@ -335,9 +338,9 @@ split_vertex()
|
|||
Surface_fixture_3<T> f;
|
||||
halfedge_descriptor h1, h2;
|
||||
bool found;
|
||||
boost::tie(h1, found) = halfedge(f.w, f.y, f.m);
|
||||
std::tie(h1, found) = halfedge(f.w, f.y, f.m);
|
||||
assert(found);
|
||||
boost::tie(h2, found) = halfedge(f.z, f.y, f.m);
|
||||
std::tie(h2, found) = halfedge(f.z, f.y, f.m);
|
||||
assert(found);
|
||||
assert(face(h2, f.m) == Traits::null_face());
|
||||
|
||||
|
|
@ -358,13 +361,13 @@ split_join_vertex_inverse()
|
|||
Surface_fixture_3<T> f;
|
||||
halfedge_descriptor h, h1, h2;
|
||||
bool found;
|
||||
boost::tie(h, found) = halfedge(f.w, f.x, f.m);
|
||||
std::tie(h, found) = halfedge(f.w, f.x, f.m);
|
||||
assert(found);
|
||||
CGAL::Euler::join_vertex(h,f.m);
|
||||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
boost::tie(h1, found) = halfedge(f.z, f.x, f.m);
|
||||
std::tie(h1, found) = halfedge(f.z, f.x, f.m);
|
||||
assert(found);
|
||||
boost::tie(h2, found) = halfedge(f.v, f.x, f.m);
|
||||
std::tie(h2, found) = halfedge(f.v, f.x, f.m);
|
||||
assert(found);
|
||||
CGAL::Euler::join_vertex(CGAL::Euler::split_vertex(h1, h2,f.m),f.m);
|
||||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
|
|
@ -448,6 +451,67 @@ remove_center_vertex_test()
|
|||
assert(CGAL::internal::exact_num_halfedges(f.m) == nh-(2*deg));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
remove_degree_2_vertex_test()
|
||||
{
|
||||
CGAL_GRAPH_TRAITS_MEMBERS(T);
|
||||
|
||||
// vertex at .first should be removable, and after removal,
|
||||
// there should .second[0] nv, .second[1] ne, and .second[2] nf
|
||||
// anything not in the map should not be removable
|
||||
std::map<std::size_t, std::array<std::size_t, 3> > removable;
|
||||
removable[0] = CGAL::make_array<std::size_t>(28, 92, 19);
|
||||
removable[13] = CGAL::make_array<std::size_t>(28, 90, 18);
|
||||
removable[14] = CGAL::make_array<std::size_t>(28, 90, 18);
|
||||
removable[16] = CGAL::make_array<std::size_t>(28, 90, 18);
|
||||
removable[17] = CGAL::make_array<std::size_t>(28, 92, 19);
|
||||
removable[18] = CGAL::make_array<std::size_t>(28, 92, 19);
|
||||
removable[21] = CGAL::make_array<std::size_t>(28, 92, 19);
|
||||
removable[26] = CGAL::make_array<std::size_t>(28, 90, 18);
|
||||
|
||||
auto test = [&removable](const std::size_t hi) // intentional copy of 'm'
|
||||
{
|
||||
T m;
|
||||
const bool ok = CGAL::IO::read_polygon_mesh("data/degree_2_collection.off", m);
|
||||
assert(ok);
|
||||
assert(CGAL::is_valid_polygon_mesh(m));
|
||||
|
||||
auto vim = CGAL::get_initialized_vertex_index_map(m);
|
||||
|
||||
const halfedge_descriptor h = *(std::next(halfedges(m).begin(), hi));
|
||||
const vertex_descriptor v = target(h, m);
|
||||
auto vid = get(vim, v);
|
||||
if(degree(v, m) != 2)
|
||||
{
|
||||
assert(removable.count(vid) == 0);
|
||||
return;
|
||||
}
|
||||
|
||||
const halfedge_descriptor res = CGAL::Euler::remove_degree_2_vertex(h, m);
|
||||
assert(res != boost::graph_traits<T>::null_halfedge());
|
||||
|
||||
const std::array<std::size_t, 3>& ns = removable.at(vid);
|
||||
|
||||
assert(ns[0] == vertices(m).size());
|
||||
assert(ns[1] == halfedges(m).size());
|
||||
assert(ns[2] == faces(m).size());
|
||||
};
|
||||
|
||||
T m;
|
||||
const bool ok = CGAL::IO::read_polygon_mesh("data/degree_2_collection.off", m);
|
||||
assert(ok);
|
||||
assert(CGAL::is_valid_polygon_mesh(m));
|
||||
|
||||
std::size_t nv = num_vertices(m);
|
||||
std::size_t nh = num_halfedges(m);
|
||||
std::size_t nf = num_faces(m);
|
||||
assert(nv == 29 && nh == 94 && nf == 19);
|
||||
|
||||
for(std::size_t hi=0; hi<num_halfedges(m); ++hi)
|
||||
test(hi);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
join_split_inverse()
|
||||
|
|
@ -670,6 +734,8 @@ template <typename Graph>
|
|||
void
|
||||
test_Euler_operations()
|
||||
{
|
||||
std::cout << "== Test with Graph: " << typeid(Graph).name() << std::endl;
|
||||
|
||||
test_copy_face_graph_nm_umbrella<Graph>();
|
||||
test_copy_face_graph_isolated_vertices<Graph>();
|
||||
join_face_test<Graph>();
|
||||
|
|
@ -684,6 +750,7 @@ test_Euler_operations()
|
|||
split_face_test<Graph>();
|
||||
make_hole_test<Graph>();
|
||||
remove_center_vertex_test<Graph>();
|
||||
remove_degree_2_vertex_test<Graph>();
|
||||
join_split_inverse<Graph>();
|
||||
does_satisfy_link_condition<Graph>();
|
||||
test_swap_edges<Graph>();
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
|
|||
|
||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||
typename boost::graph_traits<Adapter >::vertex_iterator vit, vend;
|
||||
for(boost::tie(vit, vend) = vertices(fg); vit != vend; ++vit) {
|
||||
for(std::tie(vit, vend) = vertices(fg); vit != vend; ++vit) {
|
||||
halfedge_around_target_iterator havit, havend;
|
||||
for(boost::tie(havit, havend) = CGAL::halfedges_around_target(halfedge(*vit, fg), fg);
|
||||
for(std::tie(havit, havend) = CGAL::halfedges_around_target(halfedge(*vit, fg), fg);
|
||||
havit != havend; ++havit) {
|
||||
assert(target(*havit, fg) == *vit);
|
||||
|
||||
|
|
@ -56,11 +56,11 @@ void test_halfedge_around_face_iterator(const Graph& g)
|
|||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||
|
||||
face_iterator fit, fend;
|
||||
for(boost::tie(fit, fend) = faces(fg); fit != fend; ++fit) {
|
||||
for(std::tie(fit, fend) = faces(fg); fit != fend; ++fit) {
|
||||
halfedge_around_face_iterator hafit, hafend;
|
||||
boost::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, fg), fg);
|
||||
std::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, fg), fg);
|
||||
assert(std::distance(hafit, hafend) != 0);
|
||||
for(boost::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, fg), fg); hafit != hafend; ++hafit) {
|
||||
for(std::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, fg), fg); hafit != hafend; ++hafit) {
|
||||
assert(face(*hafit, fg) == *fit);
|
||||
}
|
||||
}
|
||||
|
|
@ -78,11 +78,11 @@ void test_edge_iterators(const Graph& g)
|
|||
|
||||
// do we iterate as many as that?
|
||||
edge_iterator eb, ee;
|
||||
boost::tie(eb, ee) = edges(fg);
|
||||
std::tie(eb, ee) = edges(fg);
|
||||
assert(static_cast<edges_size_type>(std::distance(eb, ee)) == num_edges(g));
|
||||
id_map ids;
|
||||
unsigned int count = 0;
|
||||
for(boost::tie(eb, ee) = edges(fg); eb != ee; ++eb) {
|
||||
for(std::tie(eb, ee) = edges(fg); eb != ee; ++eb) {
|
||||
edge_descriptor e = *eb;
|
||||
std::pair<id_map::iterator, bool> r = ids.insert(get(boost::edge_index, g, e));
|
||||
// unique?
|
||||
|
|
@ -103,7 +103,7 @@ void test_vertex_iterators(Graph& g)
|
|||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||
vertex_iterator vb, ve;
|
||||
std::size_t count = 0;
|
||||
for(boost::tie(vb, ve) = vertices(fg); vb != ve; ++vb){
|
||||
for(std::tie(vb, ve) = vertices(fg); vb != ve; ++vb){
|
||||
++count;
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ void test_vertex_iterators(Graph& g)
|
|||
id_map ids;
|
||||
|
||||
count = 0;
|
||||
for(boost::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
std::pair<id_map::iterator, bool> r = ids.insert(get(boost::vertex_index, g, *vb));
|
||||
assert(r.second);
|
||||
++count;
|
||||
|
|
@ -133,12 +133,12 @@ void test_out_edges(const Graph& g)
|
|||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
|
||||
vertex_descriptor around = *vb;
|
||||
out_edge_iterator oeb, oee;
|
||||
for(boost::tie(oeb, oee) = out_edges(*vb, fg); oeb != oee; ++oeb) {
|
||||
for(std::tie(oeb, oee) = out_edges(*vb, fg); oeb != oee; ++oeb) {
|
||||
vertex_descriptor t = target(*oeb, fg);
|
||||
vertex_descriptor s = source(*oeb, fg);
|
||||
assert(s != t);
|
||||
|
|
@ -162,11 +162,11 @@ void test_in_edges(const Graph& g)
|
|||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
vertex_descriptor around = *vb;
|
||||
in_edge_iterator ieb, iee;
|
||||
for(boost::tie(ieb, iee) = in_edges(*vb, fg); ieb != iee; ++ieb) {
|
||||
for(std::tie(ieb, iee) = in_edges(*vb, fg); ieb != iee; ++ieb) {
|
||||
vertex_descriptor t = target(*ieb, fg);
|
||||
vertex_descriptor s = source(*ieb, fg);
|
||||
assert(t == around);
|
||||
|
|
@ -190,18 +190,18 @@ void test_in_out_edges(const Graph& g)
|
|||
|
||||
// check that the sets of in out edges are the same
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(fg); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
std::vector<vertex_descriptor> in, out;
|
||||
in_edge_iterator ieb, iee;
|
||||
for(boost::tie(ieb, iee) = in_edges(*vb, fg); ieb != iee; ++ieb) {
|
||||
for(std::tie(ieb, iee) = in_edges(*vb, fg); ieb != iee; ++ieb) {
|
||||
std::pair<id_map::iterator, bool> r =
|
||||
v_ids.insert(get(boost::vertex_index, g, source(*ieb, fg)));
|
||||
assert(r.second);
|
||||
in.push_back(source(*ieb, fg));
|
||||
}
|
||||
out_edge_iterator oeb, oee;
|
||||
for(boost::tie(oeb, oee) = out_edges(*vb, fg); oeb != oee; ++oeb) {
|
||||
for(std::tie(oeb, oee) = out_edges(*vb, fg); oeb != oee; ++oeb) {
|
||||
std::pair<id_map::iterator, bool> r =
|
||||
v_ids.insert(get(boost::vertex_index, g, target(*oeb, fg)));
|
||||
// insertion must fail
|
||||
|
|
@ -232,7 +232,7 @@ void test_edge_find(const Graph& g)
|
|||
typedef std::pair<edge_descriptor, bool> ret;
|
||||
|
||||
edge_iterator eb, ee;
|
||||
for(boost::tie(eb, ee) = edges(fg); eb != ee; ++eb) {
|
||||
for(std::tie(eb, ee) = edges(fg); eb != ee; ++eb) {
|
||||
vertex_descriptor s = source(*eb, fg);
|
||||
vertex_descriptor t = target(*eb, fg);
|
||||
ret found = edge(s, t, fg);
|
||||
|
|
@ -256,14 +256,14 @@ void test_faces(const Graph& g)
|
|||
|
||||
unsigned int count = 0;
|
||||
face_iterator fb, fe;
|
||||
for(boost::tie(fb, fe) = faces(fg); fb != fe; ++fb) {
|
||||
for(std::tie(fb, fe) = faces(fg); fb != fe; ++fb) {
|
||||
++count;
|
||||
// reverse look-up
|
||||
halfedge_descriptor assoc = halfedge(*fb, fg);
|
||||
assert(face(assoc, fg) == *fb);
|
||||
// check the enclosure
|
||||
halfedge_around_face_iterator encb, ence;
|
||||
for(boost::tie(encb, ence) = CGAL::halfedges_around_face(halfedge(*fb, fg), fg); encb != ence; ++encb) {
|
||||
for(std::tie(encb, ence) = CGAL::halfedges_around_face(halfedge(*fb, fg), fg); encb != ence; ++encb) {
|
||||
assert(face(*encb, fg) == *fb);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ struct Surface_fixture_1 {
|
|||
pm = get(CGAL::vertex_point, const_cast<const Graph&>(m));
|
||||
|
||||
typename boost::graph_traits<Graph>::vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
if (get(pm, *vb) == Point_3(0, 0, 0))
|
||||
u = *vb;
|
||||
else if(get(pm, *vb) == Point_3(1, 0, 0))
|
||||
|
|
@ -259,13 +259,13 @@ struct Surface_fixture_1 {
|
|||
f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
|
||||
assert(f1 != boost::graph_traits<Graph>::null_face());
|
||||
CGAL::Halfedge_around_face_iterator<Graph> hafib, hafie;
|
||||
for(boost::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
|
||||
for(std::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
|
||||
{
|
||||
if(! CGAL::is_border(opposite(*hafib, m), m))
|
||||
f2 = face(opposite(*hafib, m), m);
|
||||
}
|
||||
typename boost::graph_traits<Graph>::face_iterator fb, fe;
|
||||
for(boost::tie(fb, fe) = faces(m); fb != fe; ++fb) {
|
||||
for(std::tie(fb, fe) = faces(m); fb != fe; ++fb) {
|
||||
if(*fb != f1 && *fb != f2)
|
||||
f3 = *fb;
|
||||
}
|
||||
|
|
@ -289,7 +289,7 @@ struct Surface_fixture_2 {
|
|||
pm = get(CGAL::vertex_point, const_cast<const Graph&>(m));
|
||||
|
||||
typename boost::graph_traits<Graph>::vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
if (get(pm, *vb) == Point_3(0, 2, 0))
|
||||
u = *vb;
|
||||
else if(get(pm, *vb) == Point_3(2, 2, 0))
|
||||
|
|
@ -308,25 +308,25 @@ struct Surface_fixture_2 {
|
|||
assert(y != boost::graph_traits<Graph>::null_vertex());
|
||||
typename boost::graph_traits<Graph>::halfedge_descriptor h;
|
||||
bool found;
|
||||
boost::tie(h, found) = halfedge(x, v, m);
|
||||
std::tie(h, found) = halfedge(x, v, m);
|
||||
assert(found);
|
||||
assert(! CGAL::is_border(h,m));
|
||||
f1 = face(h, m);
|
||||
assert(f1 != boost::graph_traits<Graph>::null_face());
|
||||
|
||||
boost::tie(h, found) = halfedge(v, u, m);
|
||||
std::tie(h, found) = halfedge(v, u, m);
|
||||
assert(found);
|
||||
assert(!CGAL::is_border(h,m));
|
||||
f2 = face(h, m);
|
||||
assert(f2 != boost::graph_traits<Graph>::null_face());
|
||||
|
||||
boost::tie(h, found) = halfedge(u, w, m);
|
||||
std::tie(h, found) = halfedge(u, w, m);
|
||||
assert(found);
|
||||
assert(!CGAL::is_border(h,m));
|
||||
f3 = face(h, m);
|
||||
assert(f3 != boost::graph_traits<Graph>::null_face());
|
||||
|
||||
boost::tie(h, found) = halfedge(w, x, m);
|
||||
std::tie(h, found) = halfedge(w, x, m);
|
||||
assert(found);
|
||||
assert(!CGAL::is_border(h,m));
|
||||
f4 = face(h, m);
|
||||
|
|
@ -351,7 +351,7 @@ struct Surface_fixture_3 {
|
|||
pm = get(CGAL::vertex_point, const_cast<const Graph&>(m));
|
||||
|
||||
typename boost::graph_traits<Graph>::vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(m); vb != ve; ++vb) {
|
||||
if (get(pm, *vb) == Point_3(0, 1, 0))
|
||||
u = *vb;
|
||||
else if(get(pm, *vb) == Point_3(0, 0, 0))
|
||||
|
|
@ -399,7 +399,7 @@ struct Surface_fixture_4 {
|
|||
|
||||
int found = 0;
|
||||
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
||||
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
for(std::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
if(CGAL::is_border(*hb,m)){
|
||||
if(get(pm, target(*hb,m)) == Point_3(0,0,0)){
|
||||
if(found == 0){
|
||||
|
|
@ -435,7 +435,7 @@ struct Surface_fixture_5 {
|
|||
|
||||
int found = 0;
|
||||
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
||||
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
for(std::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
if(CGAL::is_border(*hb,m)){
|
||||
if(get(pm, target(*hb,m)) == Point_3(2,1,0)){
|
||||
h1 = *hb;
|
||||
|
|
@ -500,7 +500,7 @@ struct Surface_fixture_8 {
|
|||
|
||||
int found = 0;
|
||||
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
||||
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
for(std::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||
if(get(pm, source(*hb,m)) == Point_3(0,0,0) &&
|
||||
get(pm, target(*hb,m)) == Point_3(1,0,0)){
|
||||
h1 = *hb;
|
||||
|
|
@ -521,8 +521,6 @@ struct Surface_fixture_8 {
|
|||
|
||||
Graph m;
|
||||
typename boost::graph_traits<Graph>::halfedge_descriptor h1, h2, h3;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* CGAL_TEST_PREFIX_H */
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ int main()
|
|||
|
||||
{
|
||||
out_edge_iterator b,e;
|
||||
boost::tie(b,e) = out_edges(vd,dual);
|
||||
std::tie(b,e) = out_edges(vd,dual);
|
||||
std::cerr << vd << " " << source(*b,dual) << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
in_edge_iterator b,e;
|
||||
boost::tie(b,e) = in_edges(vd,dual);
|
||||
std::tie(b,e) = in_edges(vd,dual);
|
||||
std::cerr << vd << " " << source(*b,dual) << std::endl;
|
||||
}
|
||||
std::cerr << "done"<< std::endl;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
halfedge_around_target_iterator vit, end;
|
||||
vertex_descriptor vd = target(hd,P);
|
||||
boost::tie(vit,end) = halfedges_around_target(hd,P);
|
||||
std::tie(vit,end) = halfedges_around_target(hd,P);
|
||||
while(vit!= end) {
|
||||
halfedge_descriptor hd = *vit;
|
||||
assert(target(hd,P) == vd);
|
||||
|
|
@ -113,7 +113,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
{
|
||||
halfedge_around_face_iterator vit, end;
|
||||
boost::tie(vit,end) = halfedges_around_face(hd,P);
|
||||
std::tie(vit,end) = halfedges_around_face(hd,P);
|
||||
|
||||
while(vit!= end) {
|
||||
halfedge_descriptor hd = *vit;
|
||||
|
|
@ -125,7 +125,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
{
|
||||
out_edge_iterator ohi, end;
|
||||
for(boost::tie(ohi,end) = out_edges(target(hd,P),P); ohi != end; ++ohi){
|
||||
for(std::tie(ohi,end) = out_edges(target(hd,P),P); ohi != end; ++ohi){
|
||||
edge_descriptor ed = *ohi;
|
||||
halfedge_descriptor hd2 = halfedge(ed,P);
|
||||
std::cout << get(CGAL::vertex_point, P, target(hd2,P)) << std::endl;
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
|
|||
{
|
||||
CGAL_GRAPH_TRAITS_MEMBERS(Graph);
|
||||
vertex_iterator vit, vend;
|
||||
for(boost::tie(vit, vend) = vertices(g); vit != vend; ++vit) {
|
||||
for(std::tie(vit, vend) = vertices(g); vit != vend; ++vit) {
|
||||
halfedge_around_target_iterator havit, havend;
|
||||
for(boost::tie(havit, havend) = CGAL::halfedges_around_target(halfedge(*vit, g), g);
|
||||
for(std::tie(havit, havend) = CGAL::halfedges_around_target(halfedge(*vit, g), g);
|
||||
havit != havend; ++havit) {
|
||||
assert(target(*havit, g) == *vit);
|
||||
|
||||
|
|
@ -47,11 +47,11 @@ void test_halfedge_around_face_iterator(const Graph& g)
|
|||
{
|
||||
CGAL_GRAPH_TRAITS_MEMBERS(Graph);
|
||||
face_iterator fit, fend;
|
||||
for(boost::tie(fit, fend) = faces(g); fit != fend; ++fit) {
|
||||
for(std::tie(fit, fend) = faces(g); fit != fend; ++fit) {
|
||||
halfedge_around_face_iterator hafit, hafend;
|
||||
boost::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, g), g);
|
||||
std::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, g), g);
|
||||
assert(std::distance(hafit, hafend) != 0);
|
||||
for(boost::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, g), g); hafit != hafend; ++hafit) {
|
||||
for(std::tie(hafit, hafend) = CGAL::halfedges_around_face(halfedge(*fit, g), g); hafit != hafend; ++hafit) {
|
||||
assert(face(*hafit, g) == *fit);
|
||||
}
|
||||
}
|
||||
|
|
@ -66,12 +66,12 @@ void test_halfedge_iterators(const G& g)
|
|||
|
||||
// do we iterate as many as that?
|
||||
halfedge_iterator hb, he;
|
||||
boost::tie(hb, he) = halfedges(g);
|
||||
std::tie(hb, he) = halfedges(g);
|
||||
assert(static_cast<halfedges_size_type>(std::distance(hb, he)) == num_halfedges(g));
|
||||
|
||||
id_map ids;
|
||||
unsigned int count = 0;
|
||||
for(boost::tie(hb, he) = halfedges(g); hb != he; ++hb) {
|
||||
for(std::tie(hb, he) = halfedges(g); hb != he; ++hb) {
|
||||
std::pair<id_map::iterator, bool> r = ids.insert(get(boost::halfedge_index, g, *hb));
|
||||
// unique?
|
||||
assert(r.second);
|
||||
|
|
@ -92,12 +92,12 @@ void test_edge_iterators(const G& g)
|
|||
|
||||
// do we iterate as many as that?
|
||||
edge_iterator eb, ee;
|
||||
boost::tie(eb, ee) = edges(g);
|
||||
std::tie(eb, ee) = edges(g);
|
||||
assert(static_cast<edges_size_type>(std::distance(eb, ee)) == num_edges(g));
|
||||
|
||||
id_map ids;
|
||||
unsigned int count = 0;
|
||||
for(boost::tie(eb, ee) = edges(g); eb != ee; ++eb) {
|
||||
for(std::tie(eb, ee) = edges(g); eb != ee; ++eb) {
|
||||
edge_descriptor e = *eb;
|
||||
std::pair<id_map::iterator, bool> r = ids.insert(get(boost::edge_index, g, e));
|
||||
// unique?
|
||||
|
|
@ -115,7 +115,7 @@ void test_vertex_iterators(const G& g)
|
|||
|
||||
vertex_iterator vb, ve;
|
||||
std::size_t count = 0;
|
||||
for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb){
|
||||
for(std::tie(vb, ve) = vertices(g); vb != ve; ++vb){
|
||||
++count;
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ void test_vertex_iterators(const G& g)
|
|||
id_map ids;
|
||||
|
||||
count = 0;
|
||||
for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
std::pair<id_map::iterator, bool> r = ids.insert(get(boost::vertex_index, g, *vb));
|
||||
assert(r.second);
|
||||
++count;
|
||||
|
|
@ -142,12 +142,12 @@ void test_out_edges(const G& g)
|
|||
typedef typename Traits::vertex_descriptor vertex_descriptor;
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
|
||||
vertex_descriptor around = *vb;
|
||||
out_edge_iterator oeb, oee;
|
||||
for(boost::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb) {
|
||||
for(std::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb) {
|
||||
vertex_descriptor t = target(*oeb, g);
|
||||
vertex_descriptor s = source(*oeb, g);
|
||||
assert(s != t);
|
||||
|
|
@ -169,11 +169,11 @@ void test_in_edges(const G& g)
|
|||
typedef typename Traits::vertex_descriptor vertex_descriptor;
|
||||
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
vertex_descriptor around = *vb;
|
||||
in_edge_iterator ieb, iee;
|
||||
for(boost::tie(ieb, iee) = in_edges(*vb, g); ieb != iee; ++ieb) {
|
||||
for(std::tie(ieb, iee) = in_edges(*vb, g); ieb != iee; ++ieb) {
|
||||
vertex_descriptor t = target(*ieb, g);
|
||||
vertex_descriptor s = source(*ieb, g);
|
||||
assert(t == around);
|
||||
|
|
@ -196,18 +196,18 @@ void test_in_out_edges(const G& g)
|
|||
|
||||
// check that the sets of in out edges are the same
|
||||
vertex_iterator vb, ve;
|
||||
for(boost::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
for(std::tie(vb, ve) = vertices(g); vb != ve; ++vb) {
|
||||
id_map v_ids;
|
||||
std::vector<vertex_descriptor> in, out;
|
||||
in_edge_iterator ieb, iee;
|
||||
for(boost::tie(ieb, iee) = in_edges(*vb, g); ieb != iee; ++ieb) {
|
||||
for(std::tie(ieb, iee) = in_edges(*vb, g); ieb != iee; ++ieb) {
|
||||
std::pair<id_map::iterator, bool> r =
|
||||
v_ids.insert(get(boost::vertex_index, g, source(*ieb, g)));
|
||||
assert(r.second);
|
||||
in.push_back(source(*ieb, g));
|
||||
}
|
||||
out_edge_iterator oeb, oee;
|
||||
for(boost::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb) {
|
||||
for(std::tie(oeb, oee) = out_edges(*vb, g); oeb != oee; ++oeb) {
|
||||
std::pair<id_map::iterator, bool> r =
|
||||
v_ids.insert(get(boost::vertex_index, g, target(*oeb, g)));
|
||||
// insertion must fail
|
||||
|
|
@ -239,13 +239,13 @@ void test_adjacent_vertices(const G& g)
|
|||
vertex_descriptor v = *(vertices(g).begin());
|
||||
|
||||
adjacency_iterator vb, ve;
|
||||
boost::tie(vb, ve) = adjacent_vertices(v, g);
|
||||
std::tie(vb, ve) = adjacent_vertices(v, g);
|
||||
|
||||
in_edge_iterator ieb, iee;
|
||||
boost::tie(ieb, iee) = in_edges(v, g);
|
||||
std::tie(ieb, iee) = in_edges(v, g);
|
||||
|
||||
out_edge_iterator oeb, oee;
|
||||
boost::tie(oeb, oee) = out_edges(v, g);
|
||||
std::tie(oeb, oee) = out_edges(v, g);
|
||||
|
||||
assert(std::distance(vb, ve) == std::distance(ieb, iee));
|
||||
assert(std::distance(vb, ve) == std::distance(oeb, oee));
|
||||
|
|
@ -271,7 +271,7 @@ void test_edge_find(const G& g)
|
|||
typedef std::pair<edge_descriptor, bool> ret;
|
||||
|
||||
edge_iterator eb, ee;
|
||||
for(boost::tie(eb, ee) = edges(g); eb != ee; ++eb) {
|
||||
for(std::tie(eb, ee) = edges(g); eb != ee; ++eb) {
|
||||
vertex_descriptor s = source(*eb, g);
|
||||
vertex_descriptor t = target(*eb, g);
|
||||
ret found = edge(s, t, g);
|
||||
|
|
@ -293,14 +293,14 @@ void test_faces(const G& g)
|
|||
|
||||
unsigned int count = 0;
|
||||
face_iterator fb, fe;
|
||||
for(boost::tie(fb, fe) = faces(g); fb != fe; ++fb) {
|
||||
for(std::tie(fb, fe) = faces(g); fb != fe; ++fb) {
|
||||
++count;
|
||||
// reverse look-up
|
||||
halfedge_descriptor assoc = halfedge(*fb, g);
|
||||
assert(face(assoc, g) == *fb);
|
||||
// check the enclosure
|
||||
halfedge_around_face_iterator encb, ence;
|
||||
for(boost::tie(encb, ence) = CGAL::halfedges_around_face(halfedge(*fb, g), g); encb != ence; ++encb) {
|
||||
for(std::tie(encb, ence) = CGAL::halfedges_around_face(halfedge(*fb, g), g); encb != ence; ++encb) {
|
||||
assert(face(*encb, g) == *fb);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
Mesh::Property_map<face_descriptor, FT> faces_size;
|
||||
bool created;
|
||||
boost::tie(faces_size, created)=sm.add_property_map<face_descriptor, FT>("f:size",0.);
|
||||
std::tie(faces_size, created)=sm.add_property_map<face_descriptor, FT>("f:size",0.);
|
||||
assert(created);
|
||||
|
||||
for(face_descriptor fd : sm.faces())
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ namespace ArrDirectionalTraits {}
|
|||
|
||||
/*!
|
||||
\addtogroup PkgBooleanSetOperations2Ref
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{2D Regularized Boolean Set-Operations,PkgBooleanSetOperations2}
|
||||
\cgalPkgPicture{Boolean_set_operations_2.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
/// \ingroup PkgBoundingVolumesRef
|
||||
/*!
|
||||
\addtogroup PkgBoundingVolumesRef
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{Bounding Volumes,PkgBoundingVolumes}
|
||||
\cgalPkgPicture{minCircle.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ void ASphapeIpelet::protected_run(int fn)
|
|||
Alpha_shape_2 A(LWP.begin(),LWP.end());
|
||||
int alpha=-1;
|
||||
int nb_ret;
|
||||
boost::tie(nb_ret,alpha)=request_value_from_user<int>((boost::format("# Spectral critical value (0-%d)") % A.number_of_alphas()).str() );
|
||||
std::tie(nb_ret,alpha)=request_value_from_user<int>((boost::format("# Spectral critical value (0-%d)") % A.number_of_alphas()).str() );
|
||||
if (nb_ret == -1) return;
|
||||
|
||||
if(alpha<0 || (std::size_t) alpha>A.number_of_alphas()){
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ void Cone_spanners_ipelet::protected_run(int fn)
|
|||
}
|
||||
|
||||
int ret_val;
|
||||
boost::tie(ret_val,number_of_cones)=request_value_from_user<int>("Enter the number of cones");
|
||||
std::tie(ret_val,number_of_cones)=request_value_from_user<int>("Enter the number of cones");
|
||||
if (ret_val < 0) {
|
||||
print_error_message("Incorrect value");
|
||||
return;
|
||||
|
|
@ -129,7 +129,7 @@ void Cone_spanners_ipelet::protected_run(int fn)
|
|||
}
|
||||
}
|
||||
boost::graph_traits<Graph>::edge_iterator ei, ei_end;
|
||||
for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) {
|
||||
for (std::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) {
|
||||
boost::graph_traits<Graph>::edge_descriptor e = *ei;
|
||||
boost::graph_traits<Graph>::vertex_descriptor u = source(e, g);
|
||||
boost::graph_traits<Graph>::vertex_descriptor v = target(e, g);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void generator::protected_run(int fn)
|
|||
origin= Kernel::Vector_2((bbox.xmin()+bbox.xmax())/2,(bbox.ymin()+bbox.ymax())/2);
|
||||
if (size<1){
|
||||
size=200;
|
||||
//boost::tie(ret_val,size)=request_value_from_user<int>((boost::format("Size (default : %1%)") % size).str());
|
||||
//std::tie(ret_val,size)=request_value_from_user<int>((boost::format("Size (default : %1%)") % size).str());
|
||||
//if (ret_val == -1) return;
|
||||
//if (ret_val == 0) size=200;
|
||||
origin = Kernel::Vector_2(200,200);
|
||||
|
|
@ -92,7 +92,7 @@ void generator::protected_run(int fn)
|
|||
|
||||
int nbelements=30;
|
||||
|
||||
boost::tie(ret_val,nbelements)=request_value_from_user<int>((boost::format("Number of elements (default : %1%)") % nbelements).str() );
|
||||
std::tie(ret_val,nbelements)=request_value_from_user<int>((boost::format("Number of elements (default : %1%)") % nbelements).str() );
|
||||
if (ret_val == -1) return;
|
||||
if (ret_val == 0) nbelements=30;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ void IpeletMesh2::protected_run(int fn)
|
|||
int y=static_cast<int>( floor((bbox.max)().y()-(bbox.min)().y()) );
|
||||
|
||||
int ret_val;
|
||||
boost::tie(ret_val,alpha)=request_value_from_user<double>((boost::format("Max edge length (BBox %1%x%2%)") % x % y).str() );
|
||||
std::tie(ret_val,alpha)=request_value_from_user<double>((boost::format("Max edge length (BBox %1%x%2%)") % x % y).str() );
|
||||
if (ret_val == -1) return;
|
||||
|
||||
if(alpha<0){
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@ void mstIpelet::protected_run(int /*fn*/)
|
|||
vertex_iterator vit, ve;
|
||||
// Associate indices to the vertices
|
||||
int index = 0;
|
||||
// boost::tie assigns the first and second element of the std::pair
|
||||
// std::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 ){
|
||||
for(std::tie(vit,ve)=boost::vertices(ft); vit!=ve; ++vit ){
|
||||
vertex_descriptor vd = *vit;
|
||||
vertex_id_map[vd] = index++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void MdelaunayIpelet::protected_run(int fn)
|
|||
if(fn==4 ||fn==9){
|
||||
int order;
|
||||
int ret_val;
|
||||
boost::tie(ret_val,order)=request_value_from_user<int>("Enter order");
|
||||
std::tie(ret_val,order)=request_value_from_user<int>("Enter order");
|
||||
if (ret_val < 0){
|
||||
print_error_message("Incorrect value");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ void MregularIpelet::protected_run(int fn)
|
|||
if(fn==4 || fn==9){
|
||||
|
||||
int ret_val;
|
||||
boost::tie(ret_val,order)=request_value_from_user<int>("Enter order");
|
||||
std::tie(ret_val,order)=request_value_from_user<int>("Enter order");
|
||||
if (ret_val < 0){
|
||||
print_error_message("Incorrect value");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ void nngIpelet::protected_run(int fn)
|
|||
int ret_val;
|
||||
int kNeighbors=1;
|
||||
|
||||
boost::tie(ret_val,kNeighbors)=request_value_from_user<int>((boost::format("Number of nearest neighbors (default : k=%1%)") % kNeighbors).str() );
|
||||
std::tie(ret_val,kNeighbors)=request_value_from_user<int>((boost::format("Number of nearest neighbors (default : k=%1%)") % kNeighbors).str() );
|
||||
if (ret_val == -1) return;
|
||||
if (ret_val == 0) kNeighbors=1;
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ void SkeletonIpelet::protected_run(int fn)
|
|||
if (fn==0 || fn==1)
|
||||
draw_straight_skeleton(*ss,max_edge);
|
||||
else{
|
||||
boost::tie(ret_val,dist)=
|
||||
std::tie(ret_val,dist)=
|
||||
request_value_from_user<double>(
|
||||
(boost::format("Offset value (BBox %1%x%2%)") % (bbox.xmax()-bbox.xmin()) % (bbox.ymax()-bbox.ymin())).str()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
/*!
|
||||
\addtogroup PkgCircularKernel2Ref
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{2D Circular Geometry Kernel,PkgCircularKernel2}
|
||||
\cgalPkgPicture{Boolean_operation_detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ public:
|
|||
continue;
|
||||
|
||||
std::vector<float>::iterator min_it, max_it;
|
||||
boost::tie(min_it, max_it)
|
||||
std::tie(min_it, max_it)
|
||||
= boost::minmax_element (hori.begin(), hori.end());
|
||||
|
||||
std::vector<bool> occupy (1 + (std::size_t)((*max_it - *min_it) / grid.resolution()), false);
|
||||
|
|
|
|||
|
|
@ -317,9 +317,8 @@ private:
|
|||
Point ref (std::floor(p.x() / voxel_size),
|
||||
std::floor(p.y() / voxel_size),
|
||||
std::floor(p.z() / voxel_size));
|
||||
typename std::map<Point, std::vector<std::uint32_t> >::iterator it;
|
||||
boost::tie (it, boost::tuples::ignore)
|
||||
= grid.insert (std::make_pair (ref, std::vector<std::uint32_t>()));
|
||||
typename std::map<Point, std::vector<std::uint32_t> >::iterator it
|
||||
= grid.insert (std::make_pair (ref, std::vector<std::uint32_t>())).first;
|
||||
it->second.push_back (i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ int main (int, char**)
|
|||
map_added = pts.add_normal_map().second;
|
||||
assert (map_added);
|
||||
normal_map = pts.normal_map();
|
||||
boost::tie (echo_map, map_added) = pts.add_property_map<std::size_t> ("echo");
|
||||
std::tie (echo_map, map_added) = pts.add_property_map<std::size_t> ("echo");
|
||||
assert (map_added);
|
||||
boost::tie (color_map, map_added) = pts.add_property_map<CGAL::IO::Color> ("color");
|
||||
std::tie (color_map, map_added) = pts.add_property_map<CGAL::IO::Color> ("color");
|
||||
assert (map_added);
|
||||
|
||||
for (std::size_t i = 0; i < 1000; ++ i)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ namespace CGAL {
|
|||
Tag_true>::value);
|
||||
CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number));
|
||||
|
||||
mark_cell<Map,i,dim>(amap, adart, mcell_mark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(amap, adart, mcell_mark_number); }
|
||||
}
|
||||
|
||||
/// Destructor.
|
||||
|
|
@ -126,7 +127,8 @@ namespace CGAL {
|
|||
{
|
||||
unmark_treated_darts();
|
||||
Ite::rewind();
|
||||
mark_cell<Map,i,dim>(*this->mmap, (*this), mcell_mark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(*this->mmap, (*this), mcell_mark_number); }
|
||||
}
|
||||
|
||||
/// Prefix ++ operator.
|
||||
|
|
@ -199,7 +201,8 @@ namespace CGAL {
|
|||
static_assert(std::is_same<typename Ite::Basic_iterator,
|
||||
Tag_true>::value);
|
||||
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
|
||||
mark_cell<Map,i,dim>(amap, adart, mmark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(amap, adart, mmark_number); }
|
||||
}
|
||||
|
||||
/// Destructor.
|
||||
|
|
@ -234,7 +237,8 @@ namespace CGAL {
|
|||
{
|
||||
unmark_treated_darts();
|
||||
Ite::rewind();
|
||||
mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number); }
|
||||
}
|
||||
|
||||
/// Postfix ++ operator.
|
||||
|
|
@ -253,7 +257,7 @@ namespace CGAL {
|
|||
this->mmap->is_marked((*this), mmark_number));
|
||||
|
||||
if (this->cont())
|
||||
mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
|
||||
{ mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number); }
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +310,8 @@ namespace CGAL {
|
|||
static_assert(std::is_same<typename Base::Basic_iterator,
|
||||
Tag_true>::value);
|
||||
CGAL_assertion(amap.is_whole_map_unmarked(mmark_number));
|
||||
mark_cell<Map,i,dim>(amap, (*this), mmark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(amap, (*this), mmark_number); }
|
||||
}
|
||||
|
||||
/// Constructor with a dart in parameter (for end iterator).
|
||||
|
|
@ -314,8 +319,8 @@ namespace CGAL {
|
|||
Base(amap, adart),
|
||||
mmark_number(amap.get_new_mark())
|
||||
{
|
||||
if (adart!=this->mmap->null_descriptor)
|
||||
mark_cell<Map,i,dim>(amap, (*this), mmark_number);
|
||||
if (this->cont())
|
||||
{ mark_cell<Map,i,dim>(amap, (*this), mmark_number); }
|
||||
}
|
||||
|
||||
/// Destructor.
|
||||
|
|
@ -350,7 +355,8 @@ namespace CGAL {
|
|||
{
|
||||
unmark_treated_darts();
|
||||
Base::rewind();
|
||||
mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
|
||||
if(this->cont())
|
||||
{ mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number); }
|
||||
}
|
||||
|
||||
/// Postfix ++ operator.
|
||||
|
|
@ -369,7 +375,7 @@ namespace CGAL {
|
|||
this->mmap->is_marked((*this), mmark_number));
|
||||
|
||||
if (this->cont())
|
||||
mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number);
|
||||
{ mark_cell<Map,i,dim>(*this->mmap, (*this), mmark_number); }
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -610,16 +610,16 @@ public:
|
|||
}
|
||||
|
||||
iterator begin() { return empty()?end():iterator(this, 0, 0); }
|
||||
iterator end() { return iterator(this, upper_bound()); }
|
||||
iterator end() { return iterator(this, null_descriptor); }
|
||||
|
||||
const_iterator begin() const { return empty()?end():const_iterator(this, 0, 0); }
|
||||
const_iterator end() const { return const_iterator(this, upper_bound()); }
|
||||
const_iterator end() const { return const_iterator(this, null_descriptor); }
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
reverse_iterator rbegin() { return reverse_iterator(iterator(this, upper_bound())); }
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
|
||||
const_reverse_iterator
|
||||
rbegin() const { return const_reverse_iterator(end()); }
|
||||
rbegin() const { return const_reverse_iterator(iterator(this, upper_bound())); }
|
||||
const_reverse_iterator
|
||||
rend() const { return const_reverse_iterator(begin()); }
|
||||
|
||||
|
|
@ -878,7 +878,8 @@ namespace internal {
|
|||
CC_iterator_with_index(const iterator &it): m_ptr_to_cc(it.m_ptr_to_cc),
|
||||
m_index(it.m_index)
|
||||
{
|
||||
CGAL_assertion(m_index<=m_ptr_to_cc->upper_bound());
|
||||
CGAL_assertion(m_index<=m_ptr_to_cc->upper_bound() ||
|
||||
m_index==DSC::null_descriptor);
|
||||
}
|
||||
|
||||
// Same for assignment operator
|
||||
|
|
@ -928,14 +929,16 @@ namespace internal {
|
|||
// It's either pointing to end(), or valid.
|
||||
CGAL_assertion_msg(m_ptr_to_cc!=nullptr,
|
||||
"Incrementing a singular iterator or an empty container iterator ?");
|
||||
CGAL_assertion_msg(m_index<m_ptr_to_cc->upper_bound(),
|
||||
"Incrementing end() ?");
|
||||
CGAL_assertion_msg(m_index<m_ptr_to_cc->upper_bound() &&
|
||||
m_index!=DSC::null_descriptor,
|
||||
"Incrementing end() ?");
|
||||
|
||||
// If it's not end(), then it's valid, we can do ++.
|
||||
do
|
||||
{ ++m_index; }
|
||||
while(m_index<m_ptr_to_cc->upper_bound() &&
|
||||
(!m_ptr_to_cc->is_used(m_index)));
|
||||
if(m_index==m_ptr_to_cc->upper_bound()) { m_index=DSC::null_descriptor; }
|
||||
}
|
||||
|
||||
void decrement()
|
||||
|
|
@ -969,7 +972,7 @@ namespace internal {
|
|||
|
||||
pointer operator->() const { return &((*m_ptr_to_cc)[m_index]); }
|
||||
|
||||
bool is_end() const { return m_index>=m_ptr_to_cc->upper_bound(); }
|
||||
bool is_end() const { return m_index==DSC::null_descriptor; }
|
||||
|
||||
// Can itself be used for bit-squatting.
|
||||
size_type for_compact_container() const
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue