mirror of https://github.com/CGAL/cgal
Merge branch 'master' into CGAL-add_missing_test
# Conflicts: # STL_Extension/test/STL_Extension/test_skiplist.cpp
This commit is contained in:
commit
d10e9387c2
|
|
@ -0,0 +1,35 @@
|
|||
# SPDX-FileCopyrightText: 2020 Free Software Foundation Europe e.V. <https://fsfe.org>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: REUSE Compliance Check
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
reuse:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: REUSE version
|
||||
uses: fsfe/reuse-action@v1
|
||||
with:
|
||||
args: --version
|
||||
- name: REUSE lint
|
||||
uses: fsfe/reuse-action@v1
|
||||
with:
|
||||
args: --include-submodules lint
|
||||
- name: REUSE SPDX SBOM
|
||||
uses: fsfe/reuse-action@v1
|
||||
with:
|
||||
args: spdx
|
||||
- name: install dependencies
|
||||
run: sudo apt-get install -y cmake
|
||||
- name: Create CGAL internal release
|
||||
run: |
|
||||
mkdir -p ./release
|
||||
cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
|
||||
- name: REUSE lint release tarball
|
||||
uses: fsfe/reuse-action@v1
|
||||
with:
|
||||
args: --root ./release/CGAL-9.9 --include-submodules lint
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: CGAL
|
||||
Upstream-Contact: CGAL Editorial Board <info@cgal.org>
|
||||
Source: https://github.com/CGAL/cgal
|
||||
|
||||
Files: .* *.cmake *.md .github/* Maintenance/* */TODO */doc/* */deb/* */applications/* */doc_html/* */scripts/* */developer_scripts/* */demo/* */examples/* */src/* */test/* */benchmarks/* */benchmark/* */package_info/* */data/* */cmake/*
|
||||
Copyright: 1995-2023 The CGAL Project
|
||||
License: CC0-1.0
|
||||
|
||||
Files: CMakeLists.txt GraphicsView/include/CGAL/Qt/ImageInterface.ui GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm Installation/AUTHORS Installation/CMakeLists.txt Installation/README Installation/auxiliary/cgal_create_cmake_script.1 Installation/auxiliary/gmp/README Installation/include/CGAL/license/gpl_package_list.txt MacOSX/auxiliary/cgal_app.icns copyright
|
||||
Copyright: 1995-2023 The CGAL Project
|
||||
License: CC0-1.0
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
#include <iterator>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <CGAL/type_traits/is_iterator.h>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <CGAL/Default.h>
|
||||
|
|
@ -34,7 +33,7 @@ namespace CGAL {
|
|||
|
||||
/*!
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Primitive type for a edge of a polyhedral surface.
|
||||
* Primitive type for an edge of a polyhedral surface.
|
||||
* It wraps an `edge_descriptor` into a 3D segment.
|
||||
* The class model of `HalfedgeGraph` from which the primitive is built should not be deleted
|
||||
* while the AABB tree holding the primitive is in use.
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h>
|
||||
#include <CGAL/AABB_tree/internal/Primitive_helper.h>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
|
||||
#ifdef CGAL_HAS_THREADS
|
||||
#include <CGAL/mutex.h>
|
||||
|
|
@ -143,7 +142,7 @@ namespace CGAL {
|
|||
/// An explicit call to `build()` must be made to ensure that the next call to
|
||||
/// a query function will not trigger the construction of the data structure.
|
||||
/// A call to `AABBTraits::set_shared_data(t...)` is made using the internally stored traits.
|
||||
/// This procedure has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of
|
||||
/// This procedure has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of
|
||||
/// primitives of the tree.
|
||||
template<typename ... T>
|
||||
void build(T&& ...);
|
||||
|
|
@ -326,7 +325,7 @@ public:
|
|||
boost::optional< typename Intersection_and_primitive_id<Ray>::Type >
|
||||
first_intersection(const Ray& query) const
|
||||
{
|
||||
return first_intersection(query, boost::lambda::constant(false));
|
||||
return first_intersection(query, [](Primitive_id){ return false; });
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
|
|
@ -351,7 +350,7 @@ public:
|
|||
boost::optional<Primitive_id>
|
||||
first_intersected_primitive(const Ray& query) const
|
||||
{
|
||||
return first_intersected_primitive(query, boost::lambda::constant(false));
|
||||
return first_intersected_primitive(query, [](Primitive_id){ return false; });
|
||||
}
|
||||
/// \endcond
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <iterator>
|
||||
|
||||
#include <boost/functional/value_factory.hpp>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <iterator>
|
||||
|
||||
#include <boost/functional/value_factory.hpp>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
|
|
@ -92,7 +91,7 @@ int main()
|
|||
Vector bbox_center((bbox.xmin() + bbox.xmax()) / 2,
|
||||
(bbox.ymin() + bbox.ymax()) / 2,
|
||||
(bbox.zmin() + bbox.zmax()) / 2);
|
||||
boost::array<double, 3> extents;
|
||||
std::array<double, 3> extents;
|
||||
extents[0] = bbox.xmax() - bbox.xmin();
|
||||
extents[1] = bbox.ymax() - bbox.ymin();
|
||||
extents[2] = bbox.zmax() - bbox.zmin();
|
||||
|
|
|
|||
|
|
@ -612,10 +612,8 @@ class Test_is_square {
|
|||
CGAL_USE_TYPE(First_argument_type);
|
||||
CGAL_USE_TYPE(Second_argument_type);
|
||||
|
||||
static_assert(
|
||||
( ::std::is_same< AS , First_argument_type>::value));
|
||||
static_assert(
|
||||
( ::std::is_same< AS& , Second_argument_type>::value));
|
||||
static_assert(::std::is_same< AS , First_argument_type>::value);
|
||||
static_assert(::std::is_same< AS& , Second_argument_type>::value);
|
||||
//static_assert(::std::is_same< bool , Result_type>::value);
|
||||
bool b = Result_type(true); CGAL_USE(b);
|
||||
|
||||
|
|
@ -674,12 +672,9 @@ public:
|
|||
CGAL_USE_TYPE(First_argument_type);
|
||||
CGAL_USE_TYPE(Second_argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
static_assert(
|
||||
( ::std::is_same<int, First_argument_type>::value));
|
||||
static_assert(
|
||||
( ::std::is_same< AS , Second_argument_type>::value));
|
||||
static_assert(
|
||||
( ::std::is_same< AS , Result_type>::value));
|
||||
static_assert(::std::is_same<int, First_argument_type>::value);
|
||||
static_assert(::std::is_same< AS , Second_argument_type>::value);
|
||||
static_assert(::std::is_same< AS , Result_type>::value);
|
||||
AS epsilon(1);
|
||||
assert( test_equality_epsilon( AS (2),
|
||||
root( 4, AS (16) ), epsilon ) );
|
||||
|
|
@ -821,6 +816,7 @@ void test_algebraic_structure(){
|
|||
static_assert(::std::is_same< Tag, Algebraic_category>::value);
|
||||
static_assert(!::std::is_same< Simplify, Null_functor>::value);
|
||||
static_assert(!::std::is_same< Unit_part, Null_functor>::value);
|
||||
|
||||
const Simplify simplify=Simplify();;
|
||||
const Unit_part unit_part= Unit_part();
|
||||
|
||||
|
|
@ -940,8 +936,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
|
|||
|
||||
typedef CGAL::Algebraic_structure_traits<AS> AST;
|
||||
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
|
||||
static_assert(
|
||||
!(::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
||||
static_assert(!::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value);
|
||||
CGAL_USE_TYPE(Is_numerical_sensitive);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/logical.hpp>
|
||||
|
||||
|
|
@ -66,14 +65,14 @@ namespace internal {
|
|||
|
||||
template<typename Comparable,bool has_template_typedefs>
|
||||
struct Is_derived_from_Handle_with_policy {
|
||||
typedef boost::false_type Tag;
|
||||
typedef std::false_type Tag;
|
||||
};
|
||||
|
||||
template<typename Comparable>
|
||||
struct Is_derived_from_Handle_with_policy<Comparable,true> {
|
||||
|
||||
typedef typename
|
||||
boost::is_base_of< CGAL::Handle_with_policy
|
||||
std::is_base_of< CGAL::Handle_with_policy
|
||||
< typename Comparable::T,
|
||||
typename Comparable::Handle_policy,
|
||||
typename Comparable::Allocator >,
|
||||
|
|
@ -90,7 +89,7 @@ template<typename Comparable,typename Tag> struct Compare_for_vert_line_map_
|
|||
};
|
||||
|
||||
template<typename Comparable>
|
||||
struct Compare_for_vert_line_map_<Comparable,boost::true_type> {
|
||||
struct Compare_for_vert_line_map_<Comparable,std::true_type> {
|
||||
|
||||
bool operator() (const Comparable& a, const Comparable& b) const {
|
||||
return CGAL::Handle_id_less_than< Comparable >()(a,b);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ use binary search.
|
|||
`Alpha_shape_2::number_of_solid_components()` performs a graph traversal and takes time
|
||||
linear in the number of faces of the underlying triangulation.
|
||||
`Alpha_shape_2::find_optimal_alpha()` uses binary search and takes time
|
||||
\f$ O(n \log n)\f$, where \f$ n\f$ is the number of points.
|
||||
\cgalBigO{n \log n}, where \f$ n\f$ is the number of points.
|
||||
|
||||
*/
|
||||
template< typename Dt, typename ExactAlphaComparisonTag >
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ struct Alpha_nt_selector_2
|
|||
GeomTraits,
|
||||
// If the base traits is already exact then we don't need to do anything,
|
||||
// and we can simply directly use the traits class
|
||||
Boolean_tag<boost::is_floating_point<typename GeomTraits::FT>::value &&
|
||||
Boolean_tag<std::is_floating_point<typename GeomTraits::FT>::value &&
|
||||
ExactAlphaComparisonTag::value >,
|
||||
Weighted_tag>
|
||||
{ };
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ use binary search.
|
|||
`Alpha_shape_3::number_of_solid_components()` performs a graph traversal and takes time
|
||||
linear in the number of cells of the underlying triangulation.
|
||||
`Alpha_shape_3::find_optimal_alpha()` uses binary search and takes time
|
||||
\f$ O(n \log n)\f$, where \f$ n\f$ is the number of points.
|
||||
\cgalBigO{n \log n}, where \f$ n\f$ is the number of points.
|
||||
|
||||
*/
|
||||
template< typename Dt, typename ExactAlphaComparisonTag >
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ struct Alpha_nt_selector_3
|
|||
GeomTraits,
|
||||
// If the base traits is already exact then we don't need to do anything,
|
||||
// and we can simply directly use the traits class
|
||||
Boolean_tag<boost::is_floating_point<typename GeomTraits::FT>::value &&
|
||||
Boolean_tag<std::is_floating_point<typename GeomTraits::FT>::value &&
|
||||
ExactAlphaComparisonTag::value >,
|
||||
Weighted_tag>
|
||||
{ };
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <utility>
|
||||
#include <iostream>
|
||||
#include <queue>
|
||||
#include <boost/next_prior.hpp>
|
||||
|
||||
#include <CGAL/Triangulation_utils_3.h>
|
||||
#include <CGAL/Unique_hash_map.h>
|
||||
|
|
@ -255,7 +254,7 @@ public:
|
|||
std::back_inserter(cells),
|
||||
Emptyset_iterator()));
|
||||
|
||||
Facet facet=*boost::prior(facets_on_the_boundary_of_the_hole.end());
|
||||
Facet facet=*std::prev(facets_on_the_boundary_of_the_hole.end());
|
||||
|
||||
// Remember the points that are hidden by the conflicting cells,
|
||||
// as they will be deleted during the insertion.
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class Alpha_wrap_3
|
|||
using Alpha_PQ = Modifiable_priority_queue<Gate, Less_gate, Gate_ID_PM<Dt>, CGAL_BOOST_PAIRING_HEAP>;
|
||||
|
||||
protected:
|
||||
const Oracle& m_oracle;
|
||||
const Oracle m_oracle;
|
||||
SC_Iso_cuboid_3 m_bbox;
|
||||
|
||||
FT m_alpha, m_sq_alpha;
|
||||
|
|
@ -1343,6 +1343,7 @@ private:
|
|||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
// Not the best complexity, but it's very cheap compared to the rest of the algorithm.
|
||||
void make_manifold()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//
|
||||
// Author(s): Saurabh Singh <ssingh@cs.iitr.ac.in>
|
||||
// Ahmed Essam <theartful.ae@gmail.com>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//
|
||||
// Author(s): Saurabh Singh <ssingh@cs.iitr.ac.in>
|
||||
// Ahmed Essam <theartful.ae@gmail.com>
|
||||
|
|
|
|||
|
|
@ -1223,10 +1223,10 @@ halfedge \f$e_{\mathrm{pred}}\f$ directed toward \f$v\f$, such that
|
|||
\f$c\f$ is located between the curves associated with
|
||||
\f$e_{\mathrm{pred}}\f$ and the next halfedge in the clockwise order
|
||||
in the circular list of halfedges around \f$v\f$; see
|
||||
\cgalFigureRef{aos_fig-insert}. This search may take \f$O(d)\f$ time,
|
||||
\cgalFigureRef{aos_fig-insert}. This search may take \cgalBigO{d} time,
|
||||
where \f$d\f$ is the degree of the vertex \f$v\f$. \cgalFootnote{We
|
||||
can store the handles to the halfedges incident to \f$v\f$ in an efficient
|
||||
search structure to obtain \f$O(\log d)\f$ access time. However, as
|
||||
search structure to obtain \cgalBigO{\log d} access time. However, as
|
||||
\f$d\f$ is usually very small, this may lead to a waste of storage
|
||||
space without a meaningful improvement in running time in practice.}
|
||||
However, if the halfedge \f$e_{\mathrm{pred}}\f$ is known in advance,
|
||||
|
|
@ -1488,9 +1488,9 @@ keep up-to-date as this arrangement changes.
|
|||
As mentioned above, the triangulation strategy is provided only for
|
||||
educational purposes, and thus we do not elaborate on this strategy.
|
||||
The data structure needed by the landmark and the trapezoidal map RIC
|
||||
strategies can be constructed in \f$O(N \log N)\f$ time, where \f$N\f$
|
||||
strategies can be constructed in \cgalBigO{N \log N} time, where \f$N\f$
|
||||
is the overall number of edges in the arrangement, but the constant
|
||||
hidden in the \f$O()\f$ notation for the trapezoidal map RIC strategy
|
||||
hidden in the \cgalBigO{ } notation for the trapezoidal map RIC strategy
|
||||
is much larger. Thus, construction needed by the landmark algorithm is
|
||||
in practice significantly faster than the construction needed by the
|
||||
trapezoidal map RIC strategy. In addition, although both resulting
|
||||
|
|
@ -1647,7 +1647,7 @@ Section \ref arr_ssecpl. The output pairs are sorted in increasing
|
|||
\f$xy\f$-lexicographical order of the query point.
|
||||
|
||||
The batched point-location operation is carried out by sweeping the
|
||||
arrangement. Thus, it takes \f$O((m+N)\log{(m+N)})\f$ time, where
|
||||
arrangement. Thus, it takes \cgalBigO{(m+N)\log{(m+N)}} time, where
|
||||
\f$N\f$ is the number of edges in the arrangement. Issuing separate
|
||||
queries exploiting a point-location strategy with logarithmic query
|
||||
time per query, such as the trapezoidal map RIC strategy (see Section
|
||||
|
|
@ -2037,11 +2037,11 @@ so it must be construct from scratch.
|
|||
|
||||
In the first case, we sweep over the input curves, compute their
|
||||
intersection points, and construct the \dcel that represents their
|
||||
arrangement. This process is performed in \f$O\left((n + k)\log
|
||||
n\right)\f$ time, where \f$k\f$ is the total number of intersection
|
||||
arrangement. This process is performed in \cgalBigO{left((n + k)\log
|
||||
n\right} time, where \f$k\f$ is the total number of intersection
|
||||
points. The running time is asymptotically better than the time needed
|
||||
for incremental insertion if the arrangement is relatively sparse
|
||||
(when \f$k\f$ is \f$O(\frac{n^2}{\log n}\f$)), but it is recommended
|
||||
(when \f$k\f$ is \cgalBigO{\frac{n^2}{\log n}}), but it is recommended
|
||||
that this aggregate construction process be used even for dense
|
||||
arrangements, since the plane-sweep algorithm performs fewer geometric
|
||||
operations compared to the incremental insertion algorithms, and hence
|
||||
|
|
@ -4346,7 +4346,7 @@ a point with respect to an \f$x\f$-monotone polyline, we use binary
|
|||
search to locate the relevant segment that contains the point in its
|
||||
\f$x\f$-range. Then, we compute the position of the point with respect
|
||||
to this segment. Thus, operations on \f$x\f$-monotone polylines of
|
||||
size \f$m\f$ typically take \f$O(\log m)\f$ time.
|
||||
size \f$m\f$ typically take \cgalBigO{\log m} time.
|
||||
|
||||
You are free to choose the underlying segment traits class. Your
|
||||
decision could be based, for example, on the number of expected
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ Seidel \cgalCite{s-sfira-91} (see also [\cgalCite{bkos-cgaa-00} Chapter 6).
|
|||
It subdivides each arrangement face to pseudo-trapezoidal cells, each
|
||||
of constant complexity, and constructs and maintains a linear-size search
|
||||
structure on top of these cells, such that each query can be answered
|
||||
in \f$ O(\log n)\f$ time, where \f$ n\f$ is the complexity of the arrangement.
|
||||
in \cgalBigO{\log n} time, where \f$ n\f$ is the complexity of the arrangement.
|
||||
|
||||
Constructing the search structures takes \f$ O(n \log n)\f$ expected time
|
||||
Constructing the search structures takes \cgalBigO{n \log n} expected time
|
||||
and may require a small number of rebuilds \cgalCite{hkh-iiplgtds-12}. Therefore
|
||||
attaching a trapezoidal point-location object to an existing arrangement
|
||||
may incur some overhead in running times. In addition, the point-location
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ namespace CGAL {
|
|||
//typedef const result_type& qualified_result_type;
|
||||
|
||||
template < typename T >
|
||||
//typename boost::remove_reference<qualified_result_type>::type
|
||||
//std::remove_reference_t<qualified_result_type>
|
||||
Circular_arc_point_2
|
||||
operator()(const T &a) const
|
||||
{
|
||||
|
|
@ -370,7 +370,7 @@ namespace CGAL {
|
|||
typedef Point_2 result_type;
|
||||
//typedef const result_type& qualified_result_type;
|
||||
|
||||
//typename boost::remove_reference<qualified_result_type>::type
|
||||
//std::remove_reference_t<qualified_result_type>
|
||||
result_type
|
||||
operator() (const boost::variant< Arc1, Arc2 > & cv) const
|
||||
{
|
||||
|
|
@ -397,7 +397,7 @@ namespace CGAL {
|
|||
//typedef const result_type& qualified_result_type;
|
||||
|
||||
template < typename T >
|
||||
//typename boost::remove_reference<qualified_result_type>::type
|
||||
//std::remove_reference_t<qualified_result_type>
|
||||
Circular_arc_point_2
|
||||
operator()(const T &a) const
|
||||
{
|
||||
|
|
@ -420,7 +420,7 @@ namespace CGAL {
|
|||
typedef Point_2 result_type;
|
||||
//typedef const result_type& qualified_result_type;
|
||||
|
||||
//typename boost::remove_reference<qualified_result_type>::type
|
||||
//std::remove_reference<qualified_result_type>
|
||||
result_type
|
||||
operator() (const boost::variant< Arc1, Arc2 > & cv) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
typedef Tag_true Has_left_category;
|
||||
typedef Tag_true Has_merge_category;
|
||||
typedef Tag_false Has_do_intersect_category;
|
||||
//typedef boost::true_type Has_line_segment_constructor;
|
||||
//typedef std::true_type Has_line_segment_constructor;
|
||||
|
||||
typedef Arr_oblivious_side_tag Left_side_category;
|
||||
typedef Arr_oblivious_side_tag Bottom_side_category;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
typedef Arr_contracted_side_tag Top_side_category;
|
||||
typedef Arr_identified_side_tag Right_side_category;
|
||||
|
||||
typedef boost::integral_constant<bool, atan_y==0> Zero_atan_y;
|
||||
typedef std::integral_constant<bool, atan_y==0> Zero_atan_y;
|
||||
|
||||
// Traits objects
|
||||
typedef Arr_extended_direction_3<Kernel> Point_2;
|
||||
|
|
@ -358,7 +358,7 @@ public:
|
|||
*/
|
||||
void intersection_with_identification(const X_monotone_curve_2& xcv,
|
||||
Direction_3& dp,
|
||||
boost::true_type) const
|
||||
std::true_type) const
|
||||
{
|
||||
const Direction_3& normal = xcv.normal();
|
||||
dp = (CGAL::sign(normal.dz()) == POSITIVE) ?
|
||||
|
|
@ -371,7 +371,7 @@ public:
|
|||
*/
|
||||
void intersection_with_identification(const X_monotone_curve_2& xcv,
|
||||
Direction_3& dp,
|
||||
boost::false_type) const
|
||||
std::false_type) const
|
||||
{
|
||||
const Direction_3& normal = xcv.normal();
|
||||
FT z((atan_x * normal.dx() + atan_y * normal.dy()) /
|
||||
|
|
@ -383,7 +383,7 @@ public:
|
|||
* \param[in] cv the curve
|
||||
*/
|
||||
bool overlap_with_identification(const X_monotone_curve_2& xcv,
|
||||
boost::true_type) const
|
||||
std::true_type) const
|
||||
{
|
||||
const Direction_3& normal = xcv.normal();
|
||||
return ((x_sign(normal) == ZERO) &&
|
||||
|
|
@ -395,7 +395,7 @@ public:
|
|||
* \param[in] cv the curve
|
||||
*/
|
||||
bool overlap_with_identification(const X_monotone_curve_2& xcv,
|
||||
boost::false_type) const
|
||||
std::false_type) const
|
||||
{
|
||||
const Direction_3& normal = xcv.normal();
|
||||
const Direction_3& iden_normal = identification_normal();
|
||||
|
|
@ -441,7 +441,7 @@ public:
|
|||
Point_2 p;
|
||||
Direction_3& d(p);
|
||||
d = Direction_3(x, y, z);
|
||||
init(p, boost::integral_constant<bool, atan_y==0>());
|
||||
init(p, std::integral_constant<bool, atan_y==0>());
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
@ -454,14 +454,14 @@ public:
|
|||
Point_2 p;
|
||||
Direction_3& d(p);
|
||||
d = Direction_3(other);
|
||||
init(p, boost::integral_constant<bool, atan_y==0>());
|
||||
init(p, std::integral_constant<bool, atan_y==0>());
|
||||
return p;
|
||||
}
|
||||
|
||||
/*! Initialize a point on the sphere,
|
||||
* \param[in] p the point to initialize.
|
||||
*/
|
||||
void init(Point_2& p, boost::true_type) const
|
||||
void init(Point_2& p, std::true_type) const
|
||||
{
|
||||
const Direction_3& dir = p;
|
||||
if (y_sign(dir) != ZERO) {
|
||||
|
|
@ -480,7 +480,7 @@ public:
|
|||
/*! Initialize a point on the sphere,
|
||||
* \param[in] p the point to initialize.
|
||||
*/
|
||||
void init(Point_2& p, boost::false_type) const
|
||||
void init(Point_2& p, std::false_type) const
|
||||
{
|
||||
const Direction_3& dir = p;
|
||||
if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) {
|
||||
|
|
|
|||
|
|
@ -2419,7 +2419,7 @@ protected:
|
|||
/*! Obtain the index of the subcurve in the polycurve that contains the
|
||||
* point q in its x-range. The function performs a binary search, so if the
|
||||
* point q is in the x-range of the polycurve with n subcurves, the subcurve
|
||||
* containing it can be located in O(log n) operations.
|
||||
* containing it can be located in \cgalBigO{log n} operations.
|
||||
* \param cv The polycurve curve.
|
||||
* \param q The point.
|
||||
* \return An index i such that q is in the x-range of cv[i].
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace Ss2 = Surface_sweep_2;
|
|||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and
|
||||
// Curve_2 are the same class.
|
||||
// The last parameter should be boost::false_type but we used a
|
||||
// The last parameter should be std::false_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to `do_intersect(Arrangement_2<>&,
|
||||
|
|
@ -132,7 +132,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
|||
//
|
||||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the
|
||||
// same class. The last parameter should be boost::true_type but we used a
|
||||
// same class. The last parameter should be std::true_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to `do_intersect(Arrangement_2<>&,
|
||||
|
|
@ -406,7 +406,7 @@ void insert_non_empty(Arrangement_on_surface_2<GeometryTraits_2,
|
|||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and
|
||||
// Curve_2 are the same class.
|
||||
// The last parameter should be boost::false_type but we used a
|
||||
// The last parameter should be std::false_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to `do_intersect(Arrangement_2<>&,
|
||||
|
|
@ -460,7 +460,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
|||
//
|
||||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// insert of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the
|
||||
// same class. The last parameter should be boost::true_type but we used a
|
||||
// same class. The last parameter should be std::true_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to `do_intersect(Arrangement_2<>&,
|
||||
|
|
@ -1522,7 +1522,7 @@ zone(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
|||
// Checks whether the given x-monotone curve intersects the existing arrangement.
|
||||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the
|
||||
// same class. The last parameter should be boost::true_type but we used a
|
||||
// same class. The last parameter should be std::true_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&,
|
||||
|
|
@ -1559,7 +1559,7 @@ do_intersect(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
|||
// The last parameter is used to resolve ambiguity between this function and
|
||||
// do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and
|
||||
// Curve_2 are the same class.
|
||||
// The last parameter should be boost::false_type but we used a
|
||||
// The last parameter should be std::false_type but we used a
|
||||
// workaround since it didn't compile in FC3_g++-3.4.4 with the error of:
|
||||
//
|
||||
// error: no matching function for call to
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL
|
||||
{
|
||||
|
|
@ -62,7 +62,7 @@ namespace CGAL
|
|||
|
||||
// In the meanwhile we use a default implementation.
|
||||
template <class T>
|
||||
class is_arrangement_2 : public boost::false_type
|
||||
class is_arrangement_2 : public std::false_type
|
||||
{};
|
||||
|
||||
//-------------------------------- Arrangement_2
|
||||
|
|
@ -74,7 +74,7 @@ class Arrangement_2;
|
|||
template <class GeomTraits_, class DCEL_>
|
||||
class is_arrangement_2<
|
||||
Arrangement_2<GeomTraits_, DCEL_>
|
||||
> : public boost::false_type
|
||||
> : public std::false_type
|
||||
{};
|
||||
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class Arrangement_on_surface_2;
|
|||
template <class GeomTraits_, class TopTraits_>
|
||||
class is_arrangement_2<
|
||||
Arrangement_on_surface_2<GeomTraits_, TopTraits_>
|
||||
> : public boost::true_type
|
||||
> : public std::true_type
|
||||
{};
|
||||
|
||||
} // namespace CGAL
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@
|
|||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ out_degree(typename boost::graph_traits<Dual<P> >::vertex_descriptor v,
|
|||
const Dual<P>& dual)
|
||||
{
|
||||
const typename Dual<P>::Primal& primal = dual.primal();
|
||||
return boost::distance(halfedges_around_face(halfedge(v,primal),primal));
|
||||
return halfedges_around_face(halfedge(v,primal),primal).size();
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace CGAL {
|
|||
* <a href="https://www.boost.org/doc/libs/release/libs/graph/doc/filtered_graph.html"><code>boost::filtered_graph</code></a>,
|
||||
* this class only requires a way to access the selected faces and will automatically select the
|
||||
* edges/halfedges and vertices present in the adapted graph. A vertex is selected if it is incident to at least one
|
||||
* selected face. A edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge
|
||||
* selected face. An edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge
|
||||
* is selected.
|
||||
*
|
||||
* Since this class is a model of the `FaceGraph` concept, there is a restriction on the set of selected faces:
|
||||
|
|
@ -486,8 +486,8 @@ struct Face_filtered_graph
|
|||
selected_halfedges.reset();
|
||||
|
||||
typedef typename boost::property_traits<FacePatchIndexMap>::value_type Patch_index;
|
||||
std::unordered_set<Patch_index> pids(boost::begin(selected_face_patch_indices),
|
||||
boost::end(selected_face_patch_indices));
|
||||
std::unordered_set<Patch_index> pids(std::begin(selected_face_patch_indices),
|
||||
std::end(selected_face_patch_indices));
|
||||
|
||||
for(face_descriptor fd : faces(_graph) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ bool write_STL(std::ostream& os,
|
|||
if(get_mode(os) == BINARY)
|
||||
{
|
||||
os << "FileType: Binary ";
|
||||
const boost::uint32_t N32 = static_cast<boost::uint32_t>(faces(g).size());
|
||||
const std::uint32_t N32 = static_cast<std::uint32_t>(faces(g).size());
|
||||
os.write(reinterpret_cast<const char *>(&N32), sizeof(N32));
|
||||
|
||||
for(const face_descriptor f : faces(g))
|
||||
|
|
|
|||
|
|
@ -848,12 +848,12 @@ inline
|
|||
std::enable_if_t<!Has_member_clear<FaceGraph>::value, void>
|
||||
clear_impl(FaceGraph& g)
|
||||
{
|
||||
while(boost::begin(edges(g))!=boost::end(edges(g)))
|
||||
remove_edge(*boost::begin(edges(g)), g);
|
||||
while(boost::begin(faces(g))!=boost::end(faces(g)))
|
||||
remove_face(*boost::begin(faces(g)), g);
|
||||
while(boost::begin(vertices(g))!=boost::end(vertices(g)))
|
||||
remove_vertex(*boost::begin(vertices(g)), g);
|
||||
while(std::begin(edges(g))!=std::end(edges(g)))
|
||||
remove_edge(*std::begin(edges(g)), g);
|
||||
while(std::begin(faces(g))!=std::end(faces(g)))
|
||||
remove_face(*std::begin(faces(g)), g);
|
||||
while(std::begin(vertices(g))!=std::end(vertices(g)))
|
||||
remove_vertex(*std::begin(vertices(g)), g);
|
||||
}
|
||||
|
||||
template <class FaceGraph>
|
||||
|
|
@ -975,9 +975,9 @@ template<typename FaceGraph>
|
|||
void clear(FaceGraph& g)
|
||||
{
|
||||
internal::clear_impl(g);
|
||||
CGAL_postcondition(std::distance(boost::begin(edges(g)),boost::end(edges(g))) == 0);
|
||||
CGAL_postcondition(std::distance(boost::begin(vertices(g)),boost::end(vertices(g))) == 0);
|
||||
CGAL_postcondition(std::distance(boost::begin(faces(g)),boost::end(faces(g))) == 0);
|
||||
CGAL_postcondition(std::distance(std::begin(edges(g)),std::end(edges(g))) == 0);
|
||||
CGAL_postcondition(std::distance(std::begin(vertices(g)),std::end(vertices(g))) == 0);
|
||||
CGAL_postcondition(std::distance(std::begin(faces(g)),std::end(faces(g))) == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ struct Point_accessor<Handle, ValueType, ConstReference, true>
|
|||
typedef ValueType value_type;
|
||||
typedef Handle key_type;
|
||||
|
||||
typedef typename boost::mpl::if_< boost::is_reference<ConstReference>,
|
||||
typedef typename boost::mpl::if_< std::is_reference<ConstReference>,
|
||||
ValueType&,
|
||||
ValueType >::type Reference;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@
|
|||
|
||||
#include <CGAL/property_map.h>
|
||||
#include <CGAL/boost/graph/properties.h>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace CGAL{
|
||||
|
||||
|
|
@ -25,7 +23,7 @@ namespace CGAL{
|
|||
template < class TriangleMesh,
|
||||
class VertexPointMap = typename boost::property_map<TriangleMesh,vertex_point_t>::type >
|
||||
struct Triangle_from_face_descriptor_map{
|
||||
typename boost::remove_const<TriangleMesh>::type* m_tm;
|
||||
typename std::remove_const_t<TriangleMesh>* m_tm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
Triangle_from_face_descriptor_map()
|
||||
|
|
@ -33,13 +31,13 @@ struct Triangle_from_face_descriptor_map{
|
|||
{}
|
||||
|
||||
Triangle_from_face_descriptor_map(TriangleMesh const* tm)
|
||||
: m_tm( const_cast<typename boost::remove_const<TriangleMesh>::type*>(tm) )
|
||||
: m_tm( const_cast<std::remove_const_t<TriangleMesh>*>(tm) )
|
||||
, m_vpm( get(vertex_point, *m_tm) )
|
||||
{}
|
||||
|
||||
Triangle_from_face_descriptor_map(TriangleMesh const* tm,
|
||||
VertexPointMap vpm )
|
||||
: m_tm(const_cast<typename boost::remove_const<TriangleMesh>::type*>(tm))
|
||||
: m_tm(const_cast<std::remove_const_t<TriangleMesh>*>(tm))
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -57,7 +55,7 @@ struct Triangle_from_face_descriptor_map{
|
|||
get(const Triangle_from_face_descriptor_map<TriangleMesh,VertexPointMap>& pmap,
|
||||
key_type f)
|
||||
{
|
||||
typename boost::remove_const<TriangleMesh>::type & tm = *(pmap.m_tm);
|
||||
std::remove_const_t<TriangleMesh>& tm = *(pmap.m_tm);
|
||||
CGAL_precondition(halfedge(f,tm) == next(next(next(halfedge(f,tm),tm),tm),tm));
|
||||
|
||||
return value_type( get(pmap.m_vpm, target(halfedge(f,tm),tm)),
|
||||
|
|
@ -70,7 +68,7 @@ struct Triangle_from_face_descriptor_map{
|
|||
get(const Triangle_from_face_descriptor_map<TriangleMesh,VertexPointMap>& pmap,
|
||||
const std::pair<key_type, const TriangleMesh*>& f)
|
||||
{
|
||||
typename boost::remove_const<TriangleMesh>::type & tm = *(pmap.m_tm);
|
||||
std::remove_const_t<TriangleMesh> & tm = *(pmap.m_tm);
|
||||
CGAL_precondition(halfedge(f.first,tm) == next(next(next(halfedge(f.first,tm),tm),tm),tm));
|
||||
|
||||
return value_type( get(pmap.m_vpm, target(halfedge(f.first,tm),tm)),
|
||||
|
|
@ -88,13 +86,13 @@ struct Segment_from_edge_descriptor_map{
|
|||
{}
|
||||
|
||||
Segment_from_edge_descriptor_map(PolygonMesh const * pm)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(pm) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(pm) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
Segment_from_edge_descriptor_map(PolygonMesh const * pm,
|
||||
VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(pm) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(pm) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -106,7 +104,7 @@ struct Segment_from_edge_descriptor_map{
|
|||
typedef value_type reference;
|
||||
typedef boost::readable_property_map_tag category;
|
||||
//data
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//get function for property map
|
||||
|
|
@ -138,16 +136,16 @@ struct One_point_from_face_descriptor_map{
|
|||
{}
|
||||
|
||||
One_point_from_face_descriptor_map(PolygonMesh const * g)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
One_point_from_face_descriptor_map(PolygonMesh const * g, VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//classical typedefs
|
||||
|
|
@ -182,12 +180,12 @@ struct Source_point_from_edge_descriptor_map{
|
|||
{}
|
||||
|
||||
Source_point_from_edge_descriptor_map(PolygonMesh const * g)
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm( get(vertex_point, *m_pm) )
|
||||
{}
|
||||
|
||||
Source_point_from_edge_descriptor_map(PolygonMesh const * g, VertexPointMap vpm )
|
||||
: m_pm( const_cast<typename boost::remove_const<PolygonMesh>::type*>(g) )
|
||||
: m_pm( const_cast<std::remove_const_t<PolygonMesh>*>(g) )
|
||||
, m_vpm(vpm)
|
||||
{}
|
||||
|
||||
|
|
@ -198,7 +196,7 @@ struct Source_point_from_edge_descriptor_map{
|
|||
typedef boost::readable_property_map_tag category;
|
||||
|
||||
//data
|
||||
typename boost::remove_const<PolygonMesh>::type* m_pm;
|
||||
std::remove_const_t<PolygonMesh>* m_pm;
|
||||
VertexPointMap m_vpm;
|
||||
|
||||
//get function for property map
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template<typename V, typename Graph>
|
||||
struct graph_traits<
|
||||
boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> > >
|
||||
boost::tuple<std::reference_wrapper<V>, std::reference_wrapper<Graph> > >
|
||||
: boost::graph_traits< Graph >
|
||||
{
|
||||
typedef boost::graph_traits<Graph> Base;
|
||||
|
|
@ -29,20 +29,20 @@ namespace boost
|
|||
|
||||
template<typename V, typename Graph>
|
||||
struct graph_traits<
|
||||
boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> > const >
|
||||
boost::tuple<std::reference_wrapper<V>, std::reference_wrapper<Graph> > const >
|
||||
: boost::graph_traits< Graph >
|
||||
{};
|
||||
|
||||
template<typename V, typename Graph, class PropertyTag>
|
||||
struct property_map<
|
||||
boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> >,
|
||||
boost::tuple<std::reference_wrapper<V>, std::reference_wrapper<Graph> >,
|
||||
PropertyTag>
|
||||
: public property_map<Graph, PropertyTag>
|
||||
{};
|
||||
|
||||
template<typename V, typename Graph, class PropertyTag>
|
||||
struct property_map<
|
||||
const boost::tuple<boost::reference_wrapper<V>, boost::reference_wrapper<Graph> >,
|
||||
const boost::tuple<std::reference_wrapper<V>, std::reference_wrapper<Graph> >,
|
||||
PropertyTag>
|
||||
: public property_map<Graph, PropertyTag>
|
||||
{};
|
||||
|
|
@ -52,11 +52,11 @@ namespace boost
|
|||
namespace CGAL
|
||||
{
|
||||
template<typename V, typename Graph>
|
||||
boost::tuple<boost::reference_wrapper<V>,
|
||||
boost::reference_wrapper<Graph> >
|
||||
boost::tuple<std::reference_wrapper<V>,
|
||||
std::reference_wrapper<Graph> >
|
||||
make_graph_with_visitor(V& v, Graph& g)
|
||||
{
|
||||
return boost::make_tuple(boost::ref(v), boost::ref(g));
|
||||
return boost::make_tuple(std::ref(v), std::ref(g));
|
||||
}
|
||||
|
||||
template<typename Graph>
|
||||
|
|
@ -67,11 +67,8 @@ public:
|
|||
typedef typename gt::halfedge_descriptor halfedge_descriptor;
|
||||
typedef typename gt::edge_descriptor edge_descriptor;
|
||||
typedef typename gt::vertex_descriptor vertex_descriptor;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
//// OVERLOADS FOR Visitor
|
||||
|
||||
template<typename Graph>
|
||||
|
|
@ -260,119 +257,119 @@ void get(PropertyTag ptag, const Visitor_base<Graph>& w)
|
|||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::vertices_size_type
|
||||
num_vertices(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
num_vertices(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
num_vertices(boost::unwrap_ref(w.get<0>()));
|
||||
return num_vertices(boost::unwrap_ref(w.get<1>()));
|
||||
num_vertices(get<0>(w).get());
|
||||
return num_vertices(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::edges_size_type
|
||||
num_edges(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
num_edges(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
num_edges(boost::unwrap_ref(w.get<0>()));
|
||||
return num_edges(boost::unwrap_ref(w.get<1>()));
|
||||
num_edges(get<0>(w).get());
|
||||
return num_edges(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::degree_size_type
|
||||
degree(typename boost::graph_traits<Graph>::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
degree(v, boost::unwrap_ref(w.get<0>()));
|
||||
return degree(v, boost::unwrap_ref(w.get<1>()));
|
||||
degree(v, get<0>(w).get());
|
||||
return degree(v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::degree_size_type
|
||||
out_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
out_degree(v, boost::unwrap_ref(w.get<0>()));
|
||||
return out_degree(v, boost::unwrap_ref(w.get<1>()));
|
||||
out_degree(v, get<0>(w).get());
|
||||
return out_degree(v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::degree_size_type
|
||||
in_degree(typename boost::graph_traits<Graph>::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
in_degree(v, boost::unwrap_ref(w.get<0>()));
|
||||
return in_degree(v, boost::unwrap_ref(w.get<1>()));
|
||||
in_degree(v, get<0>(w).get());
|
||||
return in_degree(v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::vertex_descriptor
|
||||
source(typename boost::graph_traits<Graph>::edge_descriptor e
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> > & w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> > & w)
|
||||
{
|
||||
source(e, boost::unwrap_ref(w.get<0>()));
|
||||
return source(e, boost::unwrap_ref(w.get<1>()));
|
||||
source(e, get<0>(w).get());
|
||||
return source(e, get<1>(w).get);
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::vertex_descriptor
|
||||
target(typename boost::graph_traits<Graph>::edge_descriptor e
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> > & w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> > & w)
|
||||
{
|
||||
target(e, boost::unwrap_ref(w.get<0>()));
|
||||
return target(e, boost::unwrap_ref(w.get<1>()));
|
||||
target(e, get<0>(w).get());
|
||||
return target(e, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
std::pair<typename boost::graph_traits<Graph>::edge_descriptor, bool>
|
||||
edge(typename boost::graph_traits<Graph>::vertex_descriptor u
|
||||
, typename boost::graph_traits<Graph>::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> > & w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> > & w)
|
||||
{
|
||||
edge(u, v, boost::unwrap_ref(w.get<0>()));
|
||||
return edge(u, v, boost::unwrap_ref(w.get<1>()));
|
||||
edge(u, v, get<0>(w).get());
|
||||
return edge(u, v, get<1>(w).get);
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::vertex_iterator>
|
||||
vertices(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
vertices(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
vertices(boost::unwrap_ref(w.get<0>()));
|
||||
return vertices(boost::unwrap_ref(w.get<1>()));
|
||||
vertices(get<0>(w).get());
|
||||
return vertices(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::edge_iterator>
|
||||
edges(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
edges(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
edges(boost::unwrap_ref(w.get<0>()));
|
||||
return edges(boost::unwrap_ref(w.get<1>()));
|
||||
edges(get<0>(w).get());
|
||||
return edges(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::in_edge_iterator>
|
||||
in_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
in_edges(u, boost::unwrap_ref(w.get<0>()));
|
||||
return in_edges(u, boost::unwrap_ref(w.get<1>()));
|
||||
in_edges(u, get<0>(w).get());
|
||||
return in_edges(u, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::out_edge_iterator>
|
||||
out_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
out_edges(u, boost::unwrap_ref(w.get<0>()));
|
||||
return out_edges(u, boost::unwrap_ref(w.get<1>()));
|
||||
out_edges(u, get<0>(w).get());
|
||||
return out_edges(u, get<1>(w).get());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -381,72 +378,72 @@ out_edges(typename boost::graph_traits<Graph>::vertex_descriptor u
|
|||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::vertex_descriptor
|
||||
add_vertex(boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
add_vertex(boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
add_vertex(boost::unwrap_ref(w.get<0>()));
|
||||
return add_vertex(boost::unwrap_ref(w.get<1>()));
|
||||
add_vertex(get<0>(w).get());
|
||||
return add_vertex(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::vertex_descriptor
|
||||
add_vertex(const typename boost::graph_traits<Graph >::vertex_property_type& p
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
add_vertex(p, boost::unwrap_ref(w.get<0>()));
|
||||
return add_vertex(p, boost::unwrap_ref(w.get<1>()));
|
||||
add_vertex(p, get<0>(w).get());
|
||||
return add_vertex(p, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
remove_vertex(v, boost::unwrap_ref(w.get<0>()));
|
||||
remove_vertex(v, boost::unwrap_ref(w.get<1>()));
|
||||
remove_vertex(v, get<0>(w).get());
|
||||
remove_vertex(v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::edge_descriptor
|
||||
add_edge(boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
add_edge(boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
add_edge(boost::unwrap_ref(w.get<0>()));
|
||||
return add_edge(boost::unwrap_ref(w.get<1>()));
|
||||
add_edge(get<0>(w).get());
|
||||
return add_edge(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
remove_edge(e, boost::unwrap_ref(w.get<0>()));
|
||||
remove_edge(e, boost::unwrap_ref(w.get<1>()));
|
||||
remove_edge(e, get<0>(w).get());
|
||||
remove_edge(e, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1
|
||||
, typename boost::graph_traits< Graph >::vertex_descriptor v
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
set_target(h1, v, boost::unwrap_ref(w.get<0>()));
|
||||
set_target(h1, v, boost::unwrap_ref(w.get<1>()));
|
||||
set_target(h1, v, get<0>(w).get());
|
||||
set_target(h1, v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1
|
||||
, typename boost::graph_traits< Graph >::halfedge_descriptor h2
|
||||
, boost::tuple<boost::reference_wrapper<Visitor >,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor >,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
set_next(h1, h2, boost::unwrap_ref(w.get<0>()));
|
||||
set_next(h1, h2, boost::unwrap_ref(w.get<1>()));
|
||||
set_next(h1, h2, get<0>(w).get());
|
||||
set_next(h1, h2, get<1>(w).get());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -454,65 +451,65 @@ set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1
|
|||
//
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::face_descriptor
|
||||
add_face(boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
add_face(boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
add_face(boost::unwrap_ref(w.get<0>()));
|
||||
return add_face(boost::unwrap_ref(w.get<1>()));
|
||||
add_face(get<0>(w).get());
|
||||
return add_face(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class InputIterator, class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::face_descriptor
|
||||
add_face(InputIterator begin,
|
||||
InputIterator end,
|
||||
boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
add_face(begin, end, boost::unwrap_ref(w.get<0>()));
|
||||
return add_face(begin, end, boost::unwrap_ref(w.get<1>()));
|
||||
add_face(begin, end, get<0>(w).get());
|
||||
return add_face(begin, end, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
remove_face(typename boost::graph_traits< Graph >::face_descriptor f
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
remove_face(f, boost::unwrap_ref(w.get<0>()));
|
||||
return remove_face(f, boost::unwrap_ref(w.get<1>()));
|
||||
remove_face(f, get<0>(w).get());
|
||||
return remove_face(f, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, typename boost::graph_traits< Graph >::face_descriptor f
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
set_face(h, f, boost::unwrap_ref(w.get<0>()));
|
||||
set_face(h, f, boost::unwrap_ref(w.get<1>()));
|
||||
set_face(h, f, get<0>(w).get());
|
||||
set_face(h, f, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f
|
||||
, typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
set_halfedge(f, h, boost::unwrap_ref(w.get<0>()));
|
||||
set_halfedge(f, h, boost::unwrap_ref(w.get<1>()));
|
||||
set_halfedge(f, h, get<0>(w).get());
|
||||
set_halfedge(f, h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
void
|
||||
set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
|
||||
, typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
set_halfedge(v, h, boost::unwrap_ref(w.get<0>()));
|
||||
set_halfedge(v, h, boost::unwrap_ref(w.get<1>()));
|
||||
set_halfedge(v, h, get<0>(w).get());
|
||||
set_halfedge(v, h, get<1>(w).get());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -521,31 +518,31 @@ boost::reference_wrapper<Graph> >& w)
|
|||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::edge_descriptor
|
||||
edge(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
edge(h, boost::unwrap_ref(w.get<0>()));
|
||||
return edge(h, boost::unwrap_ref(w.get<1>()));
|
||||
edge(h, get<0>(w).get());
|
||||
return edge(h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
halfedge(typename boost::graph_traits< Graph >::edge_descriptor e
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
halfedge(e, boost::unwrap_ref(w.get<0>()));
|
||||
return halfedge(e, boost::unwrap_ref(w.get<1>()));
|
||||
halfedge(e, get<0>(w).get());
|
||||
return halfedge(e, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
halfedge(v, boost::unwrap_ref(w.get<0>()));
|
||||
return halfedge(v, boost::unwrap_ref(w.get<1>()));
|
||||
halfedge(v, get<0>(w).get());
|
||||
return halfedge(v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
|
|
@ -553,58 +550,58 @@ std::pair< typename boost::graph_traits< Graph >::halfedge_descriptor
|
|||
, bool>
|
||||
halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u
|
||||
, typename boost::graph_traits< Graph >::vertex_descriptor v
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
halfedge(u, v, boost::unwrap_ref(w.get<0>()));
|
||||
return halfedge(u, v, boost::unwrap_ref(w.get<1>()));
|
||||
halfedge(u, v, get<0>(w).get());
|
||||
return halfedge(u, v, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
opposite(h, boost::unwrap_ref(w.get<0>()));
|
||||
return opposite(h, boost::unwrap_ref(w.get<1>()));
|
||||
opposite(h, get<0>(w).get());
|
||||
return opposite(h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::vertex_descriptor
|
||||
source(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
source(h, boost::unwrap_ref(w.get<0>()));
|
||||
return source(h, boost::unwrap_ref(w.get<1>()));
|
||||
source(h, get<0>(w).get());
|
||||
return source(h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::vertex_descriptor
|
||||
target(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
target(h, boost::unwrap_ref(w.get<0>()));
|
||||
return target(h, boost::unwrap_ref(w.get<1>()));
|
||||
target(h, get<0>(w).get());
|
||||
return target(h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
next(outedge, boost::unwrap_ref(w.get<0>()));
|
||||
return next(outedge, boost::unwrap_ref(w.get<1>()));
|
||||
next(outedge, get<0>(w).get());
|
||||
return next(outedge, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
prev(outedge, boost::unwrap_ref(w.get<0>()));
|
||||
return prev(outedge, boost::unwrap_ref(w.get<1>()));
|
||||
prev(outedge, get<0>(w).get());
|
||||
return prev(outedge, get<1>(w).get());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -612,73 +609,73 @@ prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge
|
|||
//
|
||||
template <class Graph, class Visitor>
|
||||
CGAL::Iterator_range<typename boost::graph_traits< Graph >::halfedge_iterator>
|
||||
halfedges(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
halfedges(const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
halfedges(boost::unwrap_ref(w.get<0>()));
|
||||
return halfedges(boost::unwrap_ref(w.get<1>()));
|
||||
halfedges(get<0>(w).get());
|
||||
return halfedges(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedges_size_type
|
||||
num_halfedges(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
num_halfedges(const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
num_halfedges(boost::unwrap_ref(w.get<0>()));
|
||||
return num_halfedges(boost::unwrap_ref(w.get<1>()));
|
||||
num_halfedges(get<0>(w).get());
|
||||
return num_halfedges(get<1>(w).get());
|
||||
}
|
||||
|
||||
// Graph
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::face_descriptor
|
||||
face(typename boost::graph_traits< Graph >::halfedge_descriptor h
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
face(h, boost::unwrap_ref(w.get<0>()));
|
||||
return face(h, boost::unwrap_ref(w.get<1>()));
|
||||
face(h, get<0>(w).get());
|
||||
return face(h, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits< Graph >::halfedge_descriptor
|
||||
halfedge(typename boost::graph_traits< Graph >::face_descriptor f
|
||||
, const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
, const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
halfedge(f, boost::unwrap_ref(w.get<0>()));
|
||||
return halfedge(f, boost::unwrap_ref(w.get<1>()));
|
||||
halfedge(f, get<0>(w).get());
|
||||
return halfedge(f, get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
inline CGAL::Iterator_range<typename boost::graph_traits<Graph>::face_iterator >
|
||||
faces(const boost::tuple<boost::reference_wrapper<Visitor>, boost::reference_wrapper<Graph> >& w)
|
||||
faces(const boost::tuple<std::reference_wrapper<Visitor>, std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
faces(boost::unwrap_ref(w.get<0>()));
|
||||
return faces(boost::unwrap_ref(w.get<1>()));
|
||||
faces(get<0>(w).get());
|
||||
return faces(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
typename boost::graph_traits<Graph>::faces_size_type
|
||||
num_faces(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
num_faces(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
num_faces(boost::unwrap_ref(w.get<0>()));
|
||||
return num_faces(boost::unwrap_ref(w.get<1>()));
|
||||
num_faces(get<0>(w).get());
|
||||
return num_faces(get<1>(w).get());
|
||||
}
|
||||
|
||||
template <class Graph, class Visitor>
|
||||
bool is_valid(const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w
|
||||
bool is_valid(const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w
|
||||
, bool verbose = false)
|
||||
{
|
||||
is_valid(boost::unwrap_ref(w.get<0>()), verbose);
|
||||
return is_valid(boost::unwrap_ref(w.get<1>()), verbose);
|
||||
is_valid(get<0>(w).get(), verbose);
|
||||
return is_valid(get<1>(w).get(), verbose);
|
||||
}
|
||||
|
||||
template <class Graph, class PropertyTag, class Visitor>
|
||||
typename boost::property_map< Graph, PropertyTag >::type
|
||||
get(PropertyTag ptag,
|
||||
const boost::tuple<boost::reference_wrapper<Visitor>,
|
||||
boost::reference_wrapper<Graph> >& w)
|
||||
const boost::tuple<std::reference_wrapper<Visitor>,
|
||||
std::reference_wrapper<Graph> >& w)
|
||||
{
|
||||
get(ptag, boost::unwrap_ref(w.get<0>()));
|
||||
return get(ptag, boost::unwrap_ref(w.get<1>()));
|
||||
get(ptag, get<0>(w).get());
|
||||
return get(ptag, get<1>(w).get());
|
||||
}
|
||||
|
||||
}//end namespace CGAL
|
||||
|
|
|
|||
|
|
@ -270,8 +270,8 @@ join_vertex_interior_test()
|
|||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 3);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3);
|
||||
assert(degree(f.x, f.m) == 4);
|
||||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
}
|
||||
|
|
@ -295,8 +295,8 @@ join_vertex_exterior_test()
|
|||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3);
|
||||
assert(degree(f.y, f.m) == 3);
|
||||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
}
|
||||
|
|
@ -314,8 +314,8 @@ join_vertex_exterior_test()
|
|||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m).size() == 4);
|
||||
assert(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m).size() == 3);
|
||||
|
||||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
assert(degree(f.w, f.m) == 3);
|
||||
|
|
@ -344,8 +344,8 @@ split_vertex()
|
|||
assert(CGAL::is_valid_polygon_mesh(f.m));
|
||||
assert(CGAL::internal::exact_num_vertices(f.m) == 7);
|
||||
assert(CGAL::internal::exact_num_edges(f.m) == 8);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 5);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 7);
|
||||
assert(CGAL::halfedges_around_face(h1, f.m).size() == 5);
|
||||
assert(CGAL::halfedges_around_face(h2, f.m).size() == 7);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
@ -371,8 +371,8 @@ split_join_vertex_inverse()
|
|||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||
assert(CGAL::internal::exact_num_halfedges(f.m) == 12);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 3);
|
||||
assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 3);
|
||||
assert(CGAL::halfedges_around_face(h1, f.m).size() == 3);
|
||||
assert(CGAL::halfedges_around_face(h2, f.m).size() == 3);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -476,8 +476,8 @@ test_swap_edges()
|
|||
{
|
||||
Graph g;
|
||||
CGAL::make_tetrahedron(pt,pt,pt,pt,g);
|
||||
halfedge_descriptor h1 = *std::next(boost::begin(halfedges(g)), i);
|
||||
halfedge_descriptor h2 = *std::next(boost::begin(halfedges(g)), j);
|
||||
halfedge_descriptor h1 = *std::next(std::begin(halfedges(g)), i);
|
||||
halfedge_descriptor h2 = *std::next(std::begin(halfedges(g)), j);
|
||||
CGAL::internal::swap_edges(h1, h2, g);
|
||||
assert(CGAL::is_valid_polygon_mesh(g));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
|
|||
assert(target(*havit, fg) == *vit);
|
||||
|
||||
// check if we are really moving clockwise
|
||||
halfedge_around_target_iterator step = boost::next(havit);
|
||||
halfedge_around_target_iterator step = std::next(havit);
|
||||
if(step != havend) {
|
||||
halfedge_descriptor stepd = *step;
|
||||
assert(stepd == opposite(next(*havit, fg), fg));
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ void test_uniqueness(const Graph&,
|
|||
#endif
|
||||
|
||||
typename boost::range_iterator<ForwardRange>::type
|
||||
begin = boost::begin(range),
|
||||
begin2 = boost::begin(range),
|
||||
end = boost::end(range);
|
||||
begin = std::begin(range),
|
||||
begin2 = std::begin(range),
|
||||
end = std::end(range);
|
||||
|
||||
typedef std::unordered_set<typename IndexPropertyMap::value_type> id_map;
|
||||
typedef std::pair<typename id_map::iterator, bool> resultp;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
|
|||
assert(target(*havit, g) == *vit);
|
||||
|
||||
// check if we are really moving clockwise
|
||||
halfedge_around_target_iterator step = boost::next(havit);
|
||||
halfedge_around_target_iterator step = std::next(havit);
|
||||
if(step != havend) {
|
||||
halfedge_descriptor stepd = *step;
|
||||
assert(stepd == opposite(next(*havit, g), g));
|
||||
|
|
|
|||
|
|
@ -451,10 +451,10 @@ To fix the problem, we modify the weights \f$w_i\f$ as
|
|||
</center>
|
||||
|
||||
After the above normalization, this gives us the precise algorithm to compute Wachspress coordinates
|
||||
but with \f$O(n^2)\f$ performance only. The max speed \f$O(n)\f$ algorithm uses the standard
|
||||
but with \cgalBigO{n^2} performance only. The max speed \cgalBigO{n} algorithm uses the standard
|
||||
weights \f$w_i\f$. Note that mathematically this modification does not change the coordinates. One should
|
||||
be cautious when using the unnormalized Wachspress weights. In that case, you must choose the
|
||||
\f$O(n)\f$ type.
|
||||
\cgalBigO{n} type.
|
||||
|
||||
It is known that for strictly convex polygons the denominator's zero set of the
|
||||
Wachspress coordinates (\f$W^{wp} = 0~\f$) is a curve, which (in many cases) lies quite
|
||||
|
|
@ -507,10 +507,10 @@ To fix the problem, similarly to the previous subsection, we modify the weights
|
|||
</center>
|
||||
|
||||
After the above normalization, this yields the precise algorithm to compute discrete harmonic coordinates
|
||||
but with \f$O(n^2)\f$ performance only. The max speed \f$O(n)\f$ algorithm uses the standard
|
||||
but with \cgalBigO{n^2} performance only. The max speed \cgalBigO{n} algorithm uses the standard
|
||||
weights \f$w_i\f$. Again, mathematically this modification does not change the coordinates,
|
||||
one should be cautious when using the unnormalized discrete harmonic weights. In that case,
|
||||
you must choose the \f$O(n)\f$ type.
|
||||
you must choose the \cgalBigO{n} type.
|
||||
|
||||
\b Warning: as for Wachspress coordinates, we do not recommend using discrete harmonic coordinates
|
||||
for exterior points, because the curve \f$W^{dh} = 0\f$ may have several components,
|
||||
|
|
@ -563,7 +563,7 @@ After the normalization of these weights as before
|
|||
\f$b_i = \frac{w_i}{W^{mv}}\qquad\f$ with \f$\qquad W^{mv} = \sum_{j=1}^n w_j\f$
|
||||
</center>
|
||||
|
||||
we obtain the max precision \f$O(n^2)\f$ algorithm. The max speed \f$O(n)\f$ algorithm computes the
|
||||
we obtain the max precision \cgalBigO{n^2} algorithm. The max speed \cgalBigO{n} algorithm computes the
|
||||
weights \f$w_i\f$ using the pseudocode from <a href="https://www.inf.usi.ch/hormann/nsfworkshop/presentations/Hormann.pdf">here</a>.
|
||||
These weights
|
||||
|
||||
|
|
@ -575,7 +575,7 @@ with \f$\qquad t_i = \frac{\text{det}(d_i, d_{i+1})}{r_ir_{i+1} + d_id_{i+1}}\f$
|
|||
are also normalized. Note that they are unstable if a query point is closer than \f$\approx 1.0e-10\f$
|
||||
to the polygon boundary, similarly to Wachspress and discrete harmonic coordinates and
|
||||
one should be cautious when using the unnormalized mean value weights. In that case, you must choose the
|
||||
\f$O(n)\f$ type.
|
||||
\cgalBigO{n} type.
|
||||
|
||||
|
||||
\anchor compute_hm_coord
|
||||
|
|
@ -654,17 +654,17 @@ The resulting timings for all closed-form coordinates can be found in the figure
|
|||
|
||||
\cgalFigureBegin{analytic_timings, analytic_timings.png}
|
||||
Time in seconds to compute \f$n\f$ coordinate values for a polygon with \f$n\f$ vertices
|
||||
at 1 million query points with the max speed \f$O(n)\f$ algorithms (dashed) and
|
||||
at 1 million query points with the max speed \cgalBigO{n} algorithms (dashed) and
|
||||
the max precision \f$0(n^2)\f$ algorithms (solid) for Wachspress (blue), discrete
|
||||
harmonic (red), and mean value (green) coordinates.
|
||||
\cgalFigureEnd
|
||||
|
||||
From the figure above we observe that the \f$O(n^2)\f$ algorithm is as fast
|
||||
as the \f$O(n)\f$ algorithm if we have a polygon with a small number of vertices.
|
||||
From the figure above we observe that the \cgalBigO{n^2} algorithm is as fast
|
||||
as the \cgalBigO{n} algorithm if we have a polygon with a small number of vertices.
|
||||
But as the number of vertices is increased, the linear algorithm outperforms the squared one,
|
||||
as expected. One of the reasons for this behavior is that for a small number of vertices
|
||||
the multiplications of \f$n-2\f$ elements inside the \f$O(n^2)\f$ algorithm take almost the
|
||||
same time as the corresponding divisions in the \f$O(n)\f$ algorithm. For a polygon with
|
||||
the multiplications of \f$n-2\f$ elements inside the \cgalBigO{n^2} algorithm take almost the
|
||||
same time as the corresponding divisions in the \cgalBigO{n} algorithm. For a polygon with
|
||||
many vertices, these multiplications are substantially slower.
|
||||
|
||||
To benchmark harmonic coordinates, we used a MacBook Pro 2018 with 2.2 GHz Intel Core i7 processor (6 cores)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ We implement Khachyian's algorithm for rounding
|
|||
polytopes \cgalCite{cgal:k-rprnm-96}. Internally, we use
|
||||
`double`-arithmetic and (initially a single)
|
||||
Cholesky-decomposition. The algorithm's running time is
|
||||
\f$ {\cal O}(nd^2(\epsilon^{-1}+\ln d + \ln\ln(n)))\f$, where \f$ n=|P|\f$ and
|
||||
\cgalBigO{nd^2(\epsilon^{-1}+\ln d + \ln\ln(n))}, where \f$ n=|P|\f$ and
|
||||
\f$ 1+\epsilon\f$ is the desired approximation ratio.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ We implement two algorithms, the LP-algorithm and a
|
|||
heuristic \cgalCite{msw-sblp-92}. As described in the documentation of
|
||||
concept `MinSphereOfSpheresTraits`, each has its advantages and
|
||||
disadvantages: Our implementation of the LP-algorithm has maximal
|
||||
expected running time \f$ O(2^d n)\f$, while the heuristic comes without
|
||||
expected running time \cgalBigO{2^d n}, while the heuristic comes without
|
||||
any complexity guarantee. In particular, the LP-algorithm runs in
|
||||
linear time for fixed dimension \f$ d\f$. (These running times hold for the
|
||||
arithmetic model, so they count the number of operations on
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ must be a model for `RectangularPCenterTraits_2`.
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The runtime is linear for \f$ p \in \{2,\,3\}\f$ and
|
||||
\f$ \mathcal{O}(n \cdot \log n)\f$ for \f$ p = 4\f$ where \f$ n\f$ is the number of
|
||||
\cgalBigO{n \cdot \log n} for \f$ p = 4\f$ where \f$ n\f$ is the number of
|
||||
input points. These runtimes are worst case optimal. The \f$ 3\f$-center
|
||||
algorithm uses a prune-and-search technique described in
|
||||
\cgalCite{cgal:h-slacr-99}. The \f$ 4\f$-center implementation uses sorted matrix
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ The recommended choice is the first, which is a synonym to the one
|
|||
of the other two methods which we consider "the best in practice."
|
||||
In case of `CGAL::LP_algorithm`, the minsphere will be computed
|
||||
using the LP-algorithm \cgalCite{msw-sblp-92}, which in our
|
||||
implementation has maximal expected running time \f$ O(2^d n)\f$ (in the
|
||||
implementation has maximal expected running time \cgalBigO{2^d n} (in the
|
||||
number of operations on the number type `FT`). In case of
|
||||
`CGAL::Farthest_first_heuristic`, a simple heuristic will be
|
||||
used instead which seems to work fine in practice, but comes without
|
||||
|
|
|
|||
|
|
@ -350,12 +350,12 @@ parameter the function switches from the streamed segment-tree
|
|||
algorithm to the two-way-scan algorithm, see \cgalCite{cgal:ze-fsbi-02}
|
||||
for the details.
|
||||
|
||||
The streamed segment-tree algorithm needs \f$ O(n \log^d (n) + k)\f$
|
||||
worst-case running time and \f$ O(n)\f$ space, where \f$ n\f$ is the number of
|
||||
The streamed segment-tree algorithm needs \cgalBigO{n \log^d (n) + k}
|
||||
worst-case running time and \cgalBigO{n} space, where \f$ n\f$ is the number of
|
||||
boxes in both input sequences, \f$ d\f$ the (constant) dimension of the
|
||||
boxes, and \f$ k\f$ the output complexity, i.e., the number of pairwise
|
||||
intersections of the boxes. The two-way-scan algorithm needs \f$ O(n \log
|
||||
(n) + l)\f$ worst-case running time and \f$ O(n)\f$ space, where \f$ l\f$ is the
|
||||
intersections of the boxes. The two-way-scan algorithm needs \cgalBigO{n \log
|
||||
(n) + l} worst-case running time and \cgalBigO{n} space, where \f$ l\f$ is the
|
||||
number of pairwise overlapping intervals in one dimensions (the
|
||||
dimension where the algorithm is used instead of the segment tree).
|
||||
Note that \f$ l\f$ is not necessarily related to \f$ k\f$ and using the
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace CGAL {
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The algorithm is trivially testing all pairs and runs therefore in time
|
||||
\f$ O(nm)\f$ where \f$ n\f$ is the size of the first sequence and \f$ m\f$ is the
|
||||
\cgalBigO{nm} where \f$ n\f$ is the size of the first sequence and \f$ m\f$ is the
|
||||
size of the second sequence.
|
||||
*/
|
||||
|
||||
|
|
@ -219,12 +219,12 @@ void box_intersection_all_pairs_d(
|
|||
algorithm to the two-way-scan algorithm, see \cgalCite{cgal:ze-fsbi-02}
|
||||
for the details.
|
||||
|
||||
The streamed segment-tree algorithm needs \f$ O(n \log^d (n) + k)\f$
|
||||
worst-case running time and \f$ O(n)\f$ space, where \f$ n\f$ is the number of
|
||||
The streamed segment-tree algorithm needs \cgalBigO{n \log^d (n) + k}
|
||||
worst-case running time and \cgalBigO{n} space, where \f$ n\f$ is the number of
|
||||
boxes in both input sequences, \f$ d\f$ the (constant) dimension of the
|
||||
boxes, and \f$ k\f$ the output complexity, i.e., the number of pairwise
|
||||
intersections of the boxes. The two-way-scan algorithm needs \f$ O(n \log
|
||||
(n) + l)\f$ worst-case running time and \f$ O(n)\f$ space, where \f$ l\f$ is the
|
||||
intersections of the boxes. The two-way-scan algorithm needs \cgalBigO{n \log
|
||||
(n) + l} worst-case running time and \cgalBigO{n} space, where \f$ l\f$ is the
|
||||
number of pairwise overlapping intervals in one dimensions (the
|
||||
dimension where the algorithm is used instead of the segment tree).
|
||||
Note that \f$ l\f$ is not necessarily related to \f$ k\f$ and using the
|
||||
|
|
@ -397,7 +397,7 @@ namespace CGAL {
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The algorithm is trivially testing all pairs and runs therefore in time
|
||||
\f$ O(n^2)\f$ where \f$ n\f$ is the size of the input sequence. This algorithm
|
||||
\cgalBigO{n^2} where \f$ n\f$ is the size of the input sequence. This algorithm
|
||||
does not use the id-number of the boxes.
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ void box_intersection_segment_tree_d(
|
|||
const NT sup = Box_intersection_d::box_limits<NT>::sup();
|
||||
|
||||
#ifndef CGAL_LINKED_WITH_TBB
|
||||
static_assert (!(boost::is_convertible<ConcurrencyTag, Parallel_tag>::value),
|
||||
"Parallel_tag is enabled but TBB is unavailable.");
|
||||
static_assert (!std::is_convertible<ConcurrencyTag, Parallel_tag>::value,
|
||||
"Parallel_tag is enabled but TBB is unavailable.");
|
||||
#else // CGAL_LINKED_WITH_TBB
|
||||
if(boost::is_convertible<ConcurrencyTag, Parallel_tag>::value)
|
||||
if(std::is_convertible<ConcurrencyTag, Parallel_tag>::value)
|
||||
{
|
||||
// Here is an illustration for n=2.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@
|
|||
|
||||
typedef char CGAL_INT8;
|
||||
typedef short CGAL_INT16;
|
||||
typedef boost::int32_t CGAL_INT32;
|
||||
typedef std::int32_t CGAL_INT32;
|
||||
typedef unsigned char CGAL_UINT8;
|
||||
typedef unsigned short CGAL_UINT16;
|
||||
typedef boost::uint32_t CGAL_UINT32;
|
||||
typedef std::uint32_t CGAL_UINT32;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
|
|
|||
|
|
@ -55,31 +55,31 @@ struct VTK_type_generator<char> {
|
|||
};
|
||||
|
||||
template <>
|
||||
struct VTK_type_generator<boost::uint8_t> {
|
||||
struct VTK_type_generator<std::uint8_t> {
|
||||
static const int type = VTK_UNSIGNED_CHAR;
|
||||
typedef vtkUnsignedCharArray ArrayType;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VTK_type_generator<boost::int16_t> {
|
||||
struct VTK_type_generator<std::int16_t> {
|
||||
static const int type = VTK_SHORT;
|
||||
typedef vtkShortArray ArrayType;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VTK_type_generator<boost::uint16_t> {
|
||||
struct VTK_type_generator<std::uint16_t> {
|
||||
static const int type = VTK_UNSIGNED_SHORT;
|
||||
typedef vtkUnsignedShortArray ArrayType;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VTK_type_generator<boost::int32_t> {
|
||||
struct VTK_type_generator<std::int32_t> {
|
||||
static const int type = VTK_INT;
|
||||
typedef vtkIntArray ArrayType;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VTK_type_generator<boost::uint32_t> {
|
||||
struct VTK_type_generator<std::uint32_t> {
|
||||
static const int type = VTK_UNSIGNED_INT;
|
||||
typedef vtkUnsignedIntArray ArrayType;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/fusion/adapted/boost_tuple.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/phoenix/core.hpp>
|
||||
#include <boost/phoenix/operator.hpp>
|
||||
|
|
@ -106,9 +105,9 @@ namespace CGAL {
|
|||
|
||||
class SEP_header {
|
||||
|
||||
boost::array<std::size_t, 3> _n;
|
||||
boost::array<double, 3> _d;
|
||||
boost::array<double, 3> _o;
|
||||
std::array<std::size_t, 3> _n;
|
||||
std::array<double, 3> _d;
|
||||
std::array<double, 3> _o;
|
||||
|
||||
SEP_header_aux::String_dict _string_dict;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ void pcaIpelet::protected_run(int fn)
|
|||
for (std::list<Polygon_2>::iterator it=poly_list.begin();it!=poly_list.end();++it)
|
||||
if (it->size()==3){
|
||||
tri_list.push_back(Kernel::Triangle_2(*(it->vertices_begin()),
|
||||
*boost::next(it->vertices_begin()),
|
||||
*boost::next(it->vertices_begin(),2)
|
||||
*std::next(it->vertices_begin()),
|
||||
*std::next(it->vertices_begin(),2)
|
||||
));
|
||||
}
|
||||
else{
|
||||
|
|
|
|||
|
|
@ -317,10 +317,10 @@ public:
|
|||
IpeSegmentSubPath*
|
||||
create_polyline(const iterator first, const iterator last,bool setclose=false) const
|
||||
{
|
||||
if (boost::next(first)!=last){
|
||||
if (std::next(first)!=last){
|
||||
IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath();
|
||||
IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
|
||||
for (iterator it = boost::next(first);it!=last;++it){
|
||||
for (iterator it = std::next(first);it!=last;++it){
|
||||
IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
|
||||
SSP_ipe -> AppendSegment(Prev_pt,Cur_pt);
|
||||
Prev_pt=Cur_pt;
|
||||
|
|
|
|||
|
|
@ -329,10 +329,10 @@ public:
|
|||
ipe::Curve*
|
||||
create_polyline(const iterator first, const iterator last,bool setclose=false) const
|
||||
{
|
||||
if (boost::next(first)!=last){
|
||||
if (std::next(first)!=last){
|
||||
ipe::Curve* SSP_ipe = new ipe::Curve();
|
||||
ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ;
|
||||
for (iterator it = boost::next(first);it!=last;++it){
|
||||
for (iterator it = std::next(first);it!=last;++it){
|
||||
ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y()));
|
||||
SSP_ipe -> appendSegment(Prev_pt,Cur_pt);
|
||||
Prev_pt=Cur_pt;
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ private:
|
|||
|
||||
try{
|
||||
this->start();
|
||||
insert(_pm,ac.begin(),ac.end(),boost::false_type());
|
||||
insert(_pm,ac.begin(),ac.end(),std::false_type());
|
||||
this->stop();
|
||||
}
|
||||
catch (...) {
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class Bench
|
|||
try{
|
||||
this->start();
|
||||
|
||||
insert(_pm,ac.begin(),ac.end(),boost::false_type());
|
||||
insert(_pm,ac.begin(),ac.end(),std::false_type());
|
||||
|
||||
this->stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ private:
|
|||
Point_location _pl(_pm);
|
||||
try{
|
||||
this->start();
|
||||
insert(_pm,ac.begin(),ac.end(),boost::false_type());
|
||||
insert(_pm,ac.begin(),ac.end(),std::false_type());
|
||||
this->stop();
|
||||
} catch (std::exception &e) {
|
||||
this->fail();
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void do_main(const char *s) {
|
|||
struct rusage before, after;
|
||||
struct timeval utime, stime;
|
||||
getrusage(RUSAGE_SELF,&before);
|
||||
insert(_pm,ac.begin(),ac.end(),boost::false_type());
|
||||
insert(_pm,ac.begin(),ac.end(),std::false_type());
|
||||
getrusage(RUSAGE_SELF,&after);
|
||||
timersub(&(after.ru_utime),&(before.ru_utime),&utime);
|
||||
timersub(&(after.ru_stime),&(before.ru_stime),&stime);
|
||||
|
|
@ -177,7 +177,7 @@ void do_main(int k) {
|
|||
struct rusage before, after;
|
||||
struct timeval utime, stime;
|
||||
getrusage(RUSAGE_SELF,&before);
|
||||
insert(_pm,ac.begin(),ac.end(),boost::false_type());
|
||||
insert(_pm,ac.begin(),ac.end(),std::false_type());
|
||||
getrusage(RUSAGE_SELF,&after);
|
||||
timersub(&(after.ru_utime),&(before.ru_utime),&utime);
|
||||
timersub(&(after.ru_stime),&(before.ru_stime),&stime);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ class Bench
|
|||
this->start();
|
||||
for (typename ArcContainer::const_iterator it=ac.begin();
|
||||
it != ac.end(); ++it) {
|
||||
insert(_pm,*it,_pl,boost::false_type());
|
||||
insert(_pm,*it,_pl,std::false_type());
|
||||
};
|
||||
this->stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
#include <functional>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
|
||||
// These are name redefinitions for backwards compatibility
|
||||
// with the pre iterator-traits style adaptors.
|
||||
|
||||
|
|
@ -193,45 +191,45 @@ template <class C> inline
|
|||
void Assert_circulator( const C &) {
|
||||
typedef typename Circulator_traits<C>::category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, Circulator_tag>::value);
|
||||
static_assert(std::is_convertible<category, Circulator_tag>::value);
|
||||
}
|
||||
|
||||
template <class I> inline
|
||||
void Assert_iterator( const I &) {
|
||||
typedef typename Circulator_traits<I>::category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, Iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, Iterator_tag>::value);
|
||||
}
|
||||
template <class I> inline
|
||||
void Assert_input_category( const I &/*i*/) {
|
||||
typedef typename std::iterator_traits<I>::iterator_category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, std::input_iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, std::input_iterator_tag>::value);
|
||||
}
|
||||
|
||||
template <class I> inline
|
||||
void Assert_output_category( const I &/*i*/) {
|
||||
typedef typename std::iterator_traits<I>::iterator_category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, std::output_iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, std::output_iterator_tag>::value);
|
||||
}
|
||||
template <class IC> inline
|
||||
void Assert_forward_category( const IC &/*ic*/) {
|
||||
typedef typename std::iterator_traits<IC>::iterator_category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, std::forward_iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, std::forward_iterator_tag>::value);
|
||||
}
|
||||
template <class IC> inline
|
||||
void Assert_bidirectional_category( const IC &/*ic*/) {
|
||||
typedef typename std::iterator_traits<IC>::iterator_category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, std::bidirectional_iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, std::bidirectional_iterator_tag>::value);
|
||||
}
|
||||
template <class IC> inline
|
||||
void Assert_random_access_category( const IC &/*ic*/) {
|
||||
typedef typename std::iterator_traits<IC>::iterator_category category;
|
||||
CGAL_USE_TYPE(category);
|
||||
static_assert(boost::is_convertible<category, std::random_access_iterator_tag>::value);
|
||||
static_assert(std::is_convertible<category, std::random_access_iterator_tag>::value);
|
||||
}
|
||||
// The assert at-least-category functions use the following
|
||||
// functions to resolve properly. Note the proper order of the
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ Several functions allow to create specific configurations of darts into a combin
|
|||
|
||||
\subsection ssecadvmarks Boolean Marks
|
||||
|
||||
It is often necessary to mark darts, for example to retrieve in <I>O(1)</I> if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a combinatorial map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GenericMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `cm` an instance of a combinatorial map):
|
||||
It is often necessary to mark darts, for example to retrieve in \cgalBigO{1} if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a combinatorial map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GenericMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `cm` an instance of a combinatorial map):
|
||||
<ul>
|
||||
<li> get a new free mark: `size_type m = cm.`\link GenericMap::get_new_mark `get_new_mark()`\endlink (throws the exception Exception_no_more_available_mark if no mark is available);
|
||||
<li> set mark `m` for a given dart `d0`: `cm.`\link GenericMap::mark `mark(d0,m)`\endlink;
|
||||
|
|
@ -498,7 +498,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi
|
|||
|
||||
The next operations will call these functors when 2-cells are split or merged. The \link CombinatorialMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4.
|
||||
|
||||
Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged.
|
||||
Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged.
|
||||
|
||||
\cgalExample{Combinatorial_map/map_3_dynamic_onmerge.cpp}
|
||||
|
||||
|
|
|
|||
|
|
@ -1154,7 +1154,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/** Unmark all the darts of the map for a given mark.
|
||||
* If all the darts are marked or unmarked, this operation takes O(1)
|
||||
* If all the darts are marked or unmarked, this operation takes \cgalBigO{1}
|
||||
* operations, otherwise it traverses all the darts of the map.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ In constructing Theta graphs, this functor uses the algorithm from
|
|||
Chapter 4 of the book by Narasimhan and Smid \cgalCite{cgal:ns-gsn-07}.
|
||||
Basically, it is a sweep line algorithm and uses a
|
||||
balanced search tree to store the vertices that have already been scanned.
|
||||
It has the complexity of \f$O(n \log n)\f$, where \f$n\f$ is the number of vertices in the plane.
|
||||
It has the complexity of \cgalBigO{n \log n}, where \f$n\f$ is the number of vertices in the plane.
|
||||
This complexity has been proved to be optimal.
|
||||
|
||||
For more details on how to use this `Construct_theta_graph_2` functor to write an application to build Theta graphs,
|
||||
|
|
@ -178,13 +178,13 @@ The functor `Construct_yao_graph_2` has a similar definition as `Construct_theta
|
|||
|
||||
The way of using these two template parameters is the same as that of `Construct_theta_graph_2`,
|
||||
so please refer to the previous subsection for the details. We note here that construction algorithm for Yao graph
|
||||
is a slight adaptation of the algorithm for constructing Theta graph, having a complexity of \f$O(n^2)\f$.
|
||||
is a slight adaptation of the algorithm for constructing Theta graph, having a complexity of \cgalBigO{n^2}.
|
||||
The increase of complexity in this adaptation is because in constructing Theta graph,
|
||||
the searching of the 'closest' node by projection distance can be done by a balanced search tree,
|
||||
but in constructing Yao graph, the searching of the 'closest' node by Euclidean distance cannot be
|
||||
done by a balanced search tree.
|
||||
|
||||
Note that an optimal algorithm for constructing Yao graph with a complexity of \f$O(n \log n)\f$ is
|
||||
Note that an optimal algorithm for constructing Yao graph with a complexity of \cgalBigO{n \log n} is
|
||||
described in \cgalCite{cgal:cht-oacov-90}. However, this algorithm is much more complex to implement than
|
||||
the current algorithm implemented, and it can hardly reuse the codes for constructing Theta graphs,
|
||||
so it is not implemented in this package right now.
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ Minkowski sums of the convex pieces, and unite the pair-wise sums.
|
|||
|
||||
While it is desirable to have a decomposition into a minimum number of
|
||||
pieces, this problem is known to be NP-hard \cgalCite{c-cpplb-84}. Our
|
||||
implementation decomposes a Nef polyhedron \f$ N\f$ into \f$ O(r^2)\f$ convex
|
||||
implementation decomposes a Nef polyhedron \f$ N\f$ into \cgalBigO{r^2} convex
|
||||
pieces, where \f$ r\f$ is the number of edges that have two adjacent
|
||||
facets that span an angle of more than 180 degrees with respect to the
|
||||
interior of the polyhedron. Those edges are also called reflex edges.
|
||||
The bound of \f$ O(r^2)\f$ convex pieces is worst-case
|
||||
The bound of \cgalBigO{r^2} convex pieces is worst-case
|
||||
optimal \cgalCite{c-cpplb-84}.
|
||||
|
||||
\cgalFigureBegin{figverticalDecomposition,two_cubes_all_in_one.png}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
\cgalPkgPicture{Convex_decomposition_3/fig/Convex_decomposition_3-teaser.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Peter Hachenberger}
|
||||
\cgalPkgDesc{This packages provides a function for decomposing a bounded polyhedron into convex sub-polyhedra. The decomposition yields \f$ O(r^2)\f$ convex pieces, where \f$ r\f$ is the number of edges, whose adjacent facets form an angle of more than 180 degrees with respect to the polyhedron's interior. This bound is worst-case optimal. }
|
||||
\cgalPkgDesc{This packages provides a function for decomposing a bounded polyhedron into convex sub-polyhedra. The decomposition yields \cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges, whose adjacent facets form an angle of more than 180 degrees with respect to the polyhedron's interior. This bound is worst-case optimal. }
|
||||
\cgalPkgManuals{Chapter_Convex_Decomposition_of_Polyhedra,PkgConvexDecomposition3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
\cgalPkgShortInfoBegin
|
||||
|
|
|
|||
|
|
@ -41,12 +41,12 @@ The function `convex_decomposition_3()` inserts additional facets
|
|||
into the given `Nef_polyhedron_3` `N`, such that each bounded
|
||||
marked volume (the outer volume is unbounded) is subdivided into convex
|
||||
pieces. The modified polyhedron represents a decomposition into
|
||||
\f$ O(r^2)\f$ convex pieces, where \f$ r\f$ is the number of edges that have two
|
||||
\cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges that have two
|
||||
adjacent facets that span an angle of more than 180 degrees with
|
||||
respect to the interior of the polyhedron.
|
||||
|
||||
The worst-case running time of our implementation is
|
||||
\f$ O(n^2r^4\sqrt[3]{nr^2}\log{(nr)})\f$, where \f$ n\f$ is the complexity of
|
||||
\cgalBigO{n^2r^4\sqrt[3]{nr^2}\log{(nr)}}, where \f$ n\f$ is the complexity of
|
||||
the polyhedron (the complexity of a `Nef_polyhedron_3` is the sum
|
||||
of its `Vertices`, `Halfedges` and `SHalfedges`) and \f$ r\f$
|
||||
is the number of reflex edges.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ functions that return instances of these types:
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
This function uses the algorithm of Akl and
|
||||
Toussaint \cgalCite{at-fcha-78} that requires \f$ O(n \log n)\f$ time for \f$ n\f$ input
|
||||
Toussaint \cgalCite{at-fcha-78} that requires \cgalBigO{n \log n} time for \f$ n\f$ input
|
||||
points.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ functions that return instances of these types:
|
|||
|
||||
This function implements the non-recursive variation of
|
||||
Eddy's algorithm \cgalCite{e-nchap-77} described in \cgalCite{b-chfsp-78}.
|
||||
This algorithm requires \f$ O(n h)\f$ time
|
||||
This algorithm requires \cgalBigO{n h} time
|
||||
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
|
||||
*/
|
||||
template <class InputIterator, class OutputIterator, class Traits>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ This function implements Eddy's algorithm
|
|||
\cgalCite{e-nchap-77}, which is the two-dimensional version of the quickhull
|
||||
algorithm \cgalCite{bdh-qach-96}.
|
||||
|
||||
This algorithm requires \f$ O(n h)\f$ time
|
||||
This algorithm requires \cgalBigO{n h} time
|
||||
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ functions that return instances of these types:
|
|||
|
||||
This function implements Andrew's variant of the Graham
|
||||
scan algorithm \cgalCite{a-aeach-79} and follows the presentation of Mehlhorn
|
||||
\cgalCite{m-mdscg-84}. This algorithm requires \f$ O(n \log n)\f$ time
|
||||
\cgalCite{m-mdscg-84}. This algorithm requires \cgalBigO{n \log n} time
|
||||
in the worst case for \f$ n\f$ input points.
|
||||
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ functions that return instances of these types:
|
|||
|
||||
\cgalHeading{Implementation}
|
||||
|
||||
This algorithm requires \f$ O(n)\f$ time in the worst case for
|
||||
This algorithm requires \cgalBigO{n} time in the worst case for
|
||||
\f$ n\f$ input points.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ functions that return instances of these types:
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
This function uses the Jarvis march (gift-wrapping)
|
||||
algorithm \cgalCite{j-ichfs-73}. This algorithm requires \f$ O(n h)\f$ time
|
||||
algorithm \cgalCite{j-ichfs-73}. This algorithm requires \cgalBigO{n h} time
|
||||
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
|
||||
|
||||
*/
|
||||
|
|
@ -97,7 +97,7 @@ functions that return instances of these types:
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The function uses the Jarvis march (gift-wrapping) algorithm \cgalCite{j-ichfs-73}.
|
||||
This algorithm requires \f$ O(n h)\f$ time in the worst
|
||||
This algorithm requires \cgalBigO{n h} time in the worst
|
||||
case for \f$ n\f$ input points with \f$ h\f$ extreme points
|
||||
|
||||
\pre `start_p` and `stop_p` are extreme points with respect to
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ functions that return instances of these types:
|
|||
One of two algorithms is used,
|
||||
depending on the type of iterator used to specify the input points. For
|
||||
input iterators, the algorithm used is that of Bykat \cgalCite{b-chfsp-78}, which
|
||||
has a worst-case running time of \f$ O(n h)\f$, where \f$ n\f$ is the number of input
|
||||
has a worst-case running time of \cgalBigO{n h}, where \f$ n\f$ is the number of input
|
||||
points and \f$ h\f$ is the number of extreme points. For all other types of
|
||||
iterators, the \f$ O(n \log n)\f$ algorithm of of Akl and Toussaint
|
||||
iterators, the \cgalBigO{n \log n} algorithm of of Akl and Toussaint
|
||||
\cgalCite{at-fcha-78} is used.
|
||||
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ functions that return instances of these types:
|
|||
|
||||
This function uses Andrew's variant of Graham's scan algorithm
|
||||
\cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}. The algorithm has worst-case running time
|
||||
of \f$ O(n \log n)\f$ for \f$ n\f$ input points.
|
||||
of \cgalBigO{n \log n} for \f$ n\f$ input points.
|
||||
|
||||
|
||||
*/
|
||||
|
|
@ -192,7 +192,7 @@ functions that return instances of these types:
|
|||
|
||||
This function uses Andrew's
|
||||
variant of Graham's scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}. The algorithm
|
||||
has worst-case running time of \f$ O(n \log n)\f$ for \f$ n\f$ input points.
|
||||
has worst-case running time of \cgalBigO{n \log n} for \f$ n\f$ input points.
|
||||
|
||||
*/
|
||||
template <class InputIterator, class OutputIterator>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ functions that return instances of these types:
|
|||
|
||||
\cgalHeading{Implementation}
|
||||
|
||||
The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points.
|
||||
The algorithm requires \cgalBigO{n} time for a set of \f$ n\f$ input points.
|
||||
|
||||
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ functions that return instances of these types:
|
|||
|
||||
\cgalHeading{Implementation}
|
||||
|
||||
The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points.
|
||||
The algorithm requires \cgalBigO{n} time for a set of \f$ n\f$ input points.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ class need not be specified and defaults to types and operations defined
|
|||
in the kernel in which the input point type is defined.
|
||||
|
||||
Given a sequence of \f$ n\f$ input points with \f$ h\f$ extreme points,
|
||||
the function `convex_hull_2()` uses either the output-sensitive \f$ O(n h)\f$ algorithm of Bykat \cgalCite{b-chfsp-78}
|
||||
(a non-recursive version of the quickhull \cgalCite{bdh-qach-96} algorithm) or the algorithm of Akl and Toussaint, which requires \f$ O(n \log n)\f$ time
|
||||
the function `convex_hull_2()` uses either the output-sensitive \cgalBigO{n h} algorithm of Bykat \cgalCite{b-chfsp-78}
|
||||
(a non-recursive version of the quickhull \cgalCite{bdh-qach-96} algorithm) or the algorithm of Akl and Toussaint, which requires \cgalBigO{n \log n} time
|
||||
in the worst case. The algorithm chosen depends on the kind of
|
||||
iterator used to specify the input points. These two algorithms are
|
||||
also available via the functions `ch_bykat()` and `ch_akl_toussaint()`,
|
||||
respectively. Also available are
|
||||
the \f$ O(n \log n)\f$ Graham-Andrew scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}
|
||||
the \cgalBigO{n \log n} Graham-Andrew scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84}
|
||||
(`ch_graham_andrew()`),
|
||||
the \f$ O(n h)\f$ Jarvis march algorithm \cgalCite{j-ichfs-73}
|
||||
the \cgalBigO{n h} Jarvis march algorithm \cgalCite{j-ichfs-73}
|
||||
(`ch_jarvis()`),
|
||||
and Eddy's \f$ O(n h)\f$ algorithm \cgalCite{e-nchap-77}
|
||||
and Eddy's \cgalBigO{n h} algorithm \cgalCite{e-nchap-77}
|
||||
(`ch_eddy()`), which corresponds to the
|
||||
two-dimensional version of the quickhull algorithm.
|
||||
The linear-time algorithm of Melkman for producing the convex hull of
|
||||
|
|
@ -105,7 +105,7 @@ provide the computation of the counterclockwise
|
|||
sequence of extreme points on the lower hull and upper hull,
|
||||
respectively. The algorithm used in these functions is
|
||||
Andrew's variant of Graham's scan algorithm \cgalCite{a-aeach-79}, \cgalCite{m-mdscg-84},
|
||||
which has worst-case running time of \f$ O(n \log n)\f$.
|
||||
which has worst-case running time of \cgalBigO{n \log n}.
|
||||
|
||||
There are also functions available for computing certain subsequences
|
||||
of the sequence of extreme points on the convex hull. The function
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ vertices of the convex hull).
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
This function implements the tests described in \cgalCite{mnssssu-cgpvg-96} to
|
||||
determine convexity and requires \f$ O(e + f)\f$ time for a polyhedron with
|
||||
determine convexity and requires \cgalBigO{e + f} time for a polyhedron with
|
||||
\f$ e\f$ edges and \f$ f\f$ faces.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <CGAL/Number_types/internal/Exact_type_selector.h>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <deque>
|
||||
|
||||
namespace CGAL
|
||||
|
|
@ -261,7 +260,7 @@ namespace CGAL
|
|||
// The check is done only if the number type is not float or double because in that
|
||||
// case we know the construction of dual points is not exact
|
||||
CGAL_assertion_msg(
|
||||
boost::is_floating_point<typename K::FT>::value ||
|
||||
std::is_floating_point<typename K::FT>::value ||
|
||||
Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin),
|
||||
"halfspace_intersection_3: origin not in the polyhedron"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ struct GT3_for_CH3 {
|
|||
template <class R_, class Polyhedron = Default,
|
||||
class Has_filtered_predicates_tag = Boolean_tag
|
||||
<
|
||||
boost::is_floating_point<typename R_::FT>::type::value &&
|
||||
std::is_floating_point<typename R_::FT>::type::value &&
|
||||
R_::Has_filtered_predicates_tag::value
|
||||
> >
|
||||
class Convex_hull_traits_3
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@
|
|||
#include <CGAL/boost/graph/named_params_helper.h>
|
||||
#include <CGAL/type_traits/is_iterator.h>
|
||||
|
||||
#include <boost/next_prior.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
|
||||
|
|
@ -149,7 +147,7 @@ namespace internal {
|
|||
//struct to select the default traits class for computing convex hull
|
||||
template< class Point_3,
|
||||
class PolygonMesh = Default,
|
||||
class Is_floating_point=typename boost::is_floating_point<typename Kernel_traits<Point_3>::Kernel::FT>::type,
|
||||
class Is_floating_point=typename std::is_floating_point<typename Kernel_traits<Point_3>::Kernel::FT>::type,
|
||||
class Has_filtered_predicates_tag=typename Kernel_traits<Point_3>::Kernel::Has_filtered_predicates_tag >
|
||||
struct Default_traits_for_Chull_3{
|
||||
typedef typename Kernel_traits<Point_3>::Kernel type;
|
||||
|
|
@ -157,7 +155,7 @@ struct Default_traits_for_Chull_3{
|
|||
|
||||
//FT is a floating point type and Kernel is a filtered kernel
|
||||
template <class Point_3, class PolygonMesh>
|
||||
struct Default_traits_for_Chull_3<Point_3, PolygonMesh, boost::true_type,Tag_true>{
|
||||
struct Default_traits_for_Chull_3<Point_3, PolygonMesh, std::true_type,Tag_true>{
|
||||
typedef Convex_hull_traits_3< typename Kernel_traits<Point_3>::Kernel, PolygonMesh, Tag_true > type;
|
||||
};
|
||||
|
||||
|
|
@ -174,7 +172,7 @@ struct Default_polyhedron_for_Chull_3<Convex_hull_traits_3<K, P, Tag> >{
|
|||
template <class T>
|
||||
struct Is_cartesian_kernel
|
||||
{
|
||||
typedef boost::false_type type;
|
||||
typedef std::false_type type;
|
||||
};
|
||||
|
||||
template <class Kernel, class PolygonMesh>
|
||||
|
|
@ -235,7 +233,7 @@ public:
|
|||
//interval arithmetic (the protector must be created before using this predicate)
|
||||
//and in case of failure, exact arithmetic is used.
|
||||
template <class Kernel, class P>
|
||||
class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel, P, Tag_true>, boost::true_type >{
|
||||
class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel, P, Tag_true>, std::true_type >{
|
||||
typedef Simple_cartesian<CGAL::internal::Exact_field_selector<double>::Type> Exact_K;
|
||||
typedef Simple_cartesian<Interval_nt_advanced > Approx_K;
|
||||
typedef Convex_hull_traits_3<Kernel, P, Tag_true> Traits;
|
||||
|
|
@ -613,7 +611,7 @@ partition_outside_sets(const std::list<Face_handle>& new_facets,
|
|||
}
|
||||
if(! point_list.empty()){
|
||||
pending_facets.push_back(f);
|
||||
f->it = boost::prior(pending_facets.end());
|
||||
f->it = std::prev(pending_facets.end());
|
||||
} else {
|
||||
f->it = pending_facets.end();
|
||||
}
|
||||
|
|
@ -748,7 +746,7 @@ void non_coplanar_quickhull_3(std::list<typename Traits::Point_3>& points,
|
|||
for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){
|
||||
if (! fit->points.empty()){
|
||||
pending_facets.push_back(fit);
|
||||
fit->it = boost::prior(pending_facets.end());
|
||||
fit->it = std::prev(pending_facets.end());
|
||||
} else {
|
||||
fit->it = pending_facets.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ int main()
|
|||
static_assert(std::is_same<SCR,Default_traits_for_Chull_3<SCR::Point_3>::type>::value);
|
||||
static_assert(std::is_same<EPEC,Default_traits_for_Chull_3<EPEC::Point_3>::type>::value);
|
||||
static_assert(std::is_same<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>,Default_traits_for_Chull_3<EPIC::Point_3>::type>::value);
|
||||
static_assert(std::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>, boost::true_type >::Protector,CGAL::Protect_FPU_rounding<true> >::value);
|
||||
static_assert(std::is_same<Is_on_positive_side_of_plane_3<CGAL::Convex_hull_traits_3<EPIC, CGAL::Default, CGAL::Tag_true>, std::true_type >::Protector,CGAL::Protect_FPU_rounding<true> >::value);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ The time and space requirements are input dependent. Let \f$C_1\f$, \f$C_2\f$, \
|
|||
let \f$ k_i\f$ be the number of facets of \f$ C_i\f$ that are visible from \f$ x\f$
|
||||
and that are not already facets of \f$ C_{i-1}\f$.
|
||||
|
||||
Then the time for inserting \f$ x\f$ is \f$ O(dim \sum_i k_i)\f$ and
|
||||
Then the time for inserting \f$ x\f$ is \cgalBigO{dim \sum_i k_i} and
|
||||
the number of new simplices constructed during the insertion of \f$x\f$
|
||||
is the number of facets of the hull which were not already facets
|
||||
of the hull before the insertion.
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ complexity are known. Also, the theoretic interest in efficiency for
|
|||
realistic inputs, as opposed to worst-case situations, is
|
||||
growing \cgalCite{v-ffrim-97}.
|
||||
For practical purposes, insight into the constant factors hidden in the
|
||||
\f$ O\f$-notation is necessary, especially if there are several competing
|
||||
\cgalBigO{ }-notation is necessary, especially if there are several competing
|
||||
algorithms.
|
||||
|
||||
Therefore, different implementations should be supplied if there is
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
\authors Stefan Schirra
|
||||
|
||||
The layer of geometry kernels provides
|
||||
basic geometric entities of constant size\cgalFootnote{In dimension \f$ d\f$, an entity of size \f$ O(d)\f$ is considered to be of constant size.} and
|
||||
basic geometric entities of constant size\cgalFootnote{In dimension \f$ d\f$, an entity of size \cgalBigO{d} is considered to be of constant size.} and
|
||||
primitive operations on them. Each entity is provided as both a
|
||||
stand-alone class, which is parameterized by a kernel class, and as a
|
||||
type in the kernel class. Each operation in the kernel is provided via
|
||||
|
|
|
|||
|
|
@ -159,9 +159,9 @@ ALIASES = "cgal=%CGAL" \
|
|||
"cgalPkgSince{1}=<B>Introduced in:</B> \cgal \1<BR>" \
|
||||
"cgalPkgDependsOn{1}=<B>Depends on:</B> \1 <BR>" \
|
||||
"cgalPkgLicense{1}=<B>License:</B> \1 <BR>" \
|
||||
"cgalPkgDemo{2}=<B>Windows Demo:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{4}=<B>Windows Demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{6}=<B>Windows Demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\6\">\5</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{2}=<B>Windows demo:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{4}=<B>Windows demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{6}=<B>Windows demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\6\">\5</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDescriptionEnd=" \
|
||||
"cgalModifBegin=\htmlonly <div class=\"CGALModification\"> \endhtmlonly \xrefitem Modification \"Modifications\" \"MODIFICATIONS\" " \
|
||||
"cgalModifEnd=\htmlonly </div> \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \
|
||||
|
|
@ -188,7 +188,9 @@ ALIASES = "cgal=%CGAL" \
|
|||
"cgalParamNEnd=</ul> \htmlonly[block] </div> \endhtmlonly </td><td></td></tr>" \
|
||||
"cgalParamSectionBegin{1}=\cgalParamNBegin{\1}" \
|
||||
"cgalParamSectionEnd=\cgalParamNEnd" \
|
||||
"cgalParamPrecondition{1}=<li><b>Precondition: </b>\1</li>"
|
||||
"cgalParamPrecondition{1}=<li><b>Precondition: </b>\1</li>" \
|
||||
"cgalBigO{1}=\f$O(\1)\f$" \
|
||||
"cgalBigOLarge{1}=\f$O\left(\1\right)\f$"
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
|
|
|
|||
|
|
@ -168,9 +168,9 @@ ALIASES = "cgal=%CGAL" \
|
|||
"cgalPkgSince{1}=<B>Introduced in:</B> \cgal \1<BR>" \
|
||||
"cgalPkgDependsOn{1}=<B>Depends on:</B> \1 <BR>" \
|
||||
"cgalPkgLicense{1}=<B>License:</B> \1 <BR>" \
|
||||
"cgalPkgDemo{2}=<B>Windows Demo:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{4}=<B>Windows Demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{6}=<B>Windows Demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\6\">\5</a><BR><B>Common Demo Dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{2}=<B>Windows demo:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{4}=<B>Windows demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDemo{6}=<B>Windows demos:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\2\">\1</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\4\">\3</a>, <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/\6\">\5</a><BR><B>Common demo dlls:</B> <a href=\"https://www.cgal.org/demo/${CGAL_CREATED_VERSION_NUM}/CGAL-demoDLLs.zip\">dlls</a><BR>" \
|
||||
"cgalPkgDescriptionEnd=" \
|
||||
"cgalModifBegin=\htmlonly <div class=\"CGALModification\"> \endhtmlonly \xrefitem Modification \"Modifications\" \"MODIFICATIONS\"" \
|
||||
"cgalModifEnd=\htmlonly </div> \endhtmlonly \latexonly END MODIFICATIONS \endlatexonly" \
|
||||
|
|
@ -197,7 +197,9 @@ ALIASES = "cgal=%CGAL" \
|
|||
"cgalParamNEnd=</ul> \htmlonly[block] </div> \endhtmlonly </td><td></td></tr>" \
|
||||
"cgalParamSectionBegin{1}=\cgalParamNBegin{\1}" \
|
||||
"cgalParamSectionEnd=\cgalParamNEnd" \
|
||||
"cgalParamPrecondition{1}=<li><b>Precondition: </b>\1</li>"
|
||||
"cgalParamPrecondition{1}=<li><b>Precondition: </b>\1</li>" \
|
||||
"cgalBigO{1}=\f$O(\1)\f$" \
|
||||
"cgalBigOLarge{1}=\f$O\left(\1\right)\f$"
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
|
|
|
|||
|
|
@ -129,14 +129,14 @@ public:
|
|||
template <class GeomTraits_, class TopTraits_>
|
||||
class is_arrangement_2<
|
||||
Envelope_diagram_on_surface_2<GeomTraits_, TopTraits_>
|
||||
> : public boost::true_type
|
||||
> : public std::true_type
|
||||
{};
|
||||
|
||||
// specialization
|
||||
template <class GeomTraits_, class DCEL_>
|
||||
class is_arrangement_2<
|
||||
Envelope_diagram_2<GeomTraits_, DCEL_>
|
||||
> : public boost::true_type
|
||||
> : public std::true_type
|
||||
{};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2088,10 +2088,10 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
|
|||
|
||||
typedef typename LK::Approximate_kernel AK;
|
||||
typedef typename LK::Exact_kernel EK;
|
||||
typedef typename boost::remove_cv<
|
||||
typename boost::remove_reference < typename AC::result_type >::type >::type AT;
|
||||
typedef typename boost::remove_cv<
|
||||
typename boost::remove_reference < typename EC::result_type >::type >::type ET;
|
||||
typedef std::remove_cv_t<
|
||||
std::remove_reference_t < typename AC::result_type > > AT;
|
||||
typedef std::remove_cv_t<
|
||||
std::remove_reference_t < typename EC::result_type > > ET;
|
||||
|
||||
typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
#include <boost/none.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <CGAL/Lazy_exact_nt.h>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
|
|
@ -64,8 +62,8 @@ public:
|
|||
|
||||
template<typename T>
|
||||
struct Has_result_type
|
||||
: boost::integral_constant< bool,
|
||||
Has_result_type_helper< typename boost::remove_cv<T>::type>::value>
|
||||
: std::integral_constant< bool,
|
||||
Has_result_type_helper< std::remove_cv_t<T>>::value>
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
|
|
@ -192,10 +190,10 @@ private:
|
|||
template <typename Construction, typename Dummy = boost::none_t>
|
||||
struct Lazy_wrapper_traits :
|
||||
boost::mpl::eval_if< internal::Has_result_type<Construction>,
|
||||
boost::mpl::eval_if< std::is_same< typename boost::remove_cv<
|
||||
typename boost::remove_reference<
|
||||
boost::mpl::eval_if< std::is_same< std::remove_cv_t<
|
||||
std::remove_reference_t<
|
||||
typename internal::Lazy_result_type<Construction>::type
|
||||
>::type >::type,
|
||||
> >,
|
||||
typename Approximate_kernel::FT>,
|
||||
boost::mpl::int_<NT>,
|
||||
boost::mpl::eval_if< std::is_same< typename internal::Lazy_result_type<Construction>::type,
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ Several functions allow to create specific configurations of darts into a genera
|
|||
|
||||
\subsection ssecadvmarksgmap Boolean Marks
|
||||
|
||||
It is often necessary to mark darts, for example to retrieve in <I>O(1)</I> if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a generalized map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GeneralizedMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `gm` an instance of a generalized map):
|
||||
It is often necessary to mark darts, for example to retrieve in \cgalBigO{1} if a given dart was already processed during a specific algorithm, for example, iteration over a given range. Users can also mark specific parts of a generalized map (for example mark all the darts belonging to objects having specific semantics). To answer these needs, a `GeneralizedMap` has a certain number of Boolean marks (fixed by the constant \link GenericMap::NB_MARKS `NB_MARKS`\endlink). When one wants to use a Boolean mark, the following methods are available (with `gm` an instance of a generalized map):
|
||||
<ul>
|
||||
<li> get a new free mark: `size_type m = gm.`\link GenericMap::get_new_mark `get_new_mark()`\endlink (throws the exception Exception_no_more_available_mark if no mark is available);
|
||||
<li> set mark `m` for a given dart `d0`: `gm.`\link GenericMap::mark `mark(d0,m)`\endlink;
|
||||
|
|
@ -520,7 +520,7 @@ Step 2 defines the onsplit and onmerge dynamic functors. We can see here that wi
|
|||
|
||||
The next operations will call these functors when 2-cells are split or merged. The \link GeneralizedMap::sew `sew<3>`\endlink operation calls 1 onmerge as two faces are identified; the \link GenericMap::insert_cell_0_in_cell_2 `insert_cell_0_in_cell_2`\endlink operation calls 3 onsplit as one face is split in 4.
|
||||
|
||||
Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged.
|
||||
Lastly we remove the dynamic onmerge functor (step 7). This is done by initializing the functor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged.
|
||||
|
||||
\cgalExample{Generalized_map/gmap_3_dynamic_onmerge.cpp}
|
||||
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/** Unmark all the darts of the map for a given mark.
|
||||
* If all the darts are marked or unmarked, this operation takes O(1)
|
||||
* If all the darts are marked or unmarked, this operation takes \cgalBigO{1}
|
||||
* operations, otherwise it traverses all the darts of the map.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ The generated polygon will have an average number of vertices \f$ n^\frac{1}{3}(
|
|||
|
||||
The implementation is based on an incremental construction of a convex hull. At each step, we choose a number of points to pick uniformly at random in the disc. Then, a subset of these points, that won't change the convex hull, is evaluated using a Binomial law.
|
||||
As these points won't be generated, the time and size complexities are reduced \cgalCite{Devillers2014Generator}.
|
||||
A tradeoff between time and memory is provided with the option `fast`, true by default. Using the `fast` option, both time and size expected complexities are \f$O\left(n^\frac{1}{3}\log^\frac{2}{3}n \right)\f$.
|
||||
If this option is disabled, the expected size complexity becomes \f$O\left(n^\frac{1}{3}\right)\f$ but the expected time complexity becomes \f$O\left(n^\frac{1}{3}\log^2 n \right)\f$.
|
||||
A tradeoff between time and memory is provided with the option `fast`, true by default. Using the `fast` option, both time and size expected complexities are \cgalBigOLarge{n^\frac{1}{3}\log^\frac{2}{3}n}.
|
||||
If this option is disabled, the expected size complexity becomes \cgalBigOLarge{n^\frac{1}{3}} but the expected time complexity becomes \cgalBigOLarge{n^\frac{1}{3}\log^2 n}.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ R >` for some representation class `R`,
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The implementation uses the centroid method
|
||||
described in \cgalCite{cgal:s-zkm-96} and has a worst case running time of \f$ O(r
|
||||
\cdot n + n \cdot \log n)\f$, where \f$ r\f$ is the time needed by `pg`
|
||||
described in \cgalCite{cgal:s-zkm-96} and has a worst case running time of \cgalBigO{r
|
||||
\cdot n + n \cdot \log n}, where \f$ r\f$ is the time needed by `pg`
|
||||
to generate a random point.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ The default traits class `Default_traits` is the kernel in which
|
|||
The implementation is based on the method of eliminating self-intersections in
|
||||
a polygon by using so-called "2-opt" moves. Such a move eliminates an
|
||||
intersection between two edges by reversing the order of the vertices between
|
||||
the edges. No more than \f$ O(n^3)\f$ such moves are required to simplify a polygon
|
||||
the edges. No more than \cgalBigO{n^3} such moves are required to simplify a polygon
|
||||
defined on \f$ n\f$ points \cgalCite{ls-utstp-82}.
|
||||
Intersecting edges are detected using a simple sweep through the vertices
|
||||
and then one intersection is chosen at random to eliminate after each sweep.
|
||||
The worse-case running time is therefore \f$ O(n^4 \log n)\f$.
|
||||
The worse-case running time is therefore \cgalBigO{n^4 \log n}.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,8 @@ struct Apply_approx_sqrt
|
|||
Apply_approx_sqrt(const Functor& f) : Functor(f) { }
|
||||
|
||||
template <class T>
|
||||
typename boost::remove_reference<
|
||||
typename cpp11::result_of<Functor(const T&)>::type>::type
|
||||
std::remove_reference_t<
|
||||
typename cpp11::result_of<Functor(const T&)>::type>
|
||||
operator()(const T& t) const
|
||||
{
|
||||
return approximate_sqrt( static_cast<const Functor&>(*this)(t) );
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ removal.
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
Currently, `HalfedgeDS_default` is derived from `CGAL::HalfedgeDS_list<Traits>`.
|
||||
The copy constructor and the assignment operator need \f$ O(n)\f$ time with
|
||||
The copy constructor and the assignment operator need \cgalBigO{n} time with
|
||||
\f$ n\f$ the total number of vertices, halfedges, and faces.
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ iterators that supports removal.
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
`HalfedgeDS_list` uses internally the `CGAL::In_place_list` container class.
|
||||
The copy constructor and the assignment operator need \f$ O(n)\f$ time with
|
||||
The copy constructor and the assignment operator need \cgalBigO{n} time with
|
||||
\f$ n\f$ the total number of vertices, halfedges, and faces.
|
||||
|
||||
`CGAL_ALLOCATOR(int)` is used as default argument for the
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <boost/config.hpp>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/properties.hpp>
|
||||
|
|
|
|||
|
|
@ -223,8 +223,8 @@ The algorithm is as follows:
|
|||
|
||||
The time complexity of the algorithm is determined primarily by the
|
||||
choice of linear solver. In the current implementation, Cholesky
|
||||
prefactorization is roughly \f$ O(N^{1.5})\f$ and computation of distances is
|
||||
roughly \f$ O(N)\f$, where \f$ N\f$ is the number of vertices in the triangulation.
|
||||
prefactorization is roughly \cgalBigO{N^{1.5}} and computation of distances is
|
||||
roughly \cgalBigO{N}, where \f$ N\f$ is the number of vertices in the triangulation.
|
||||
The algorithm uses two \f$ N \times N\f$ matrices, both with the same pattern of
|
||||
non-zeros (in average 7 non-zeros
|
||||
per row/column). The cost of computation is independent of the size
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#define CGAL_HOMOGENEOUS_POINT_2_H
|
||||
|
||||
#include <CGAL/Origin.h>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/logical.hpp>
|
||||
|
||||
|
|
@ -54,8 +53,8 @@ public:
|
|||
|
||||
template < typename Tx, typename Ty >
|
||||
PointH2(const Tx & x, const Ty & y,
|
||||
std::enable_if_t< boost::mpl::and_<boost::is_convertible<Tx, RT>,
|
||||
boost::is_convertible<Ty, RT> >::value >* = 0)
|
||||
std::enable_if_t< boost::mpl::and_<std::is_convertible<Tx, RT>,
|
||||
std::is_convertible<Ty, RT> >::value >* = 0)
|
||||
: base(x, y) {}
|
||||
|
||||
PointH2(const FT& x, const FT& y)
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ public:
|
|||
|
||||
template < typename Tx, typename Ty, typename Tz >
|
||||
PointH3(const Tx & x, const Ty & y, const Tz & z,
|
||||
std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible<Tx, RT>,
|
||||
boost::is_convertible<Ty, RT> >,
|
||||
boost::is_convertible<Tz, RT> >::value >* = 0)
|
||||
std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible<Tx, RT>,
|
||||
std::is_convertible<Ty, RT> >,
|
||||
std::is_convertible<Tz, RT> >::value >* = 0)
|
||||
: base(x, y, z) {}
|
||||
|
||||
PointH3(const FT& x, const FT& y, const FT& z)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
|
||||
#include <CGAL/Handle_for.h>
|
||||
|
||||
#include <boost/next_prior.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class R_ >
|
||||
|
|
@ -59,8 +57,8 @@ public:
|
|||
|
||||
template < typename Tx, typename Ty >
|
||||
VectorH2(const Tx & x, const Ty & y,
|
||||
std::enable_if_t< boost::mpl::and_<boost::is_convertible<Tx, RT>,
|
||||
boost::is_convertible<Ty, RT> >::value >* = 0)
|
||||
std::enable_if_t< boost::mpl::and_<std::is_convertible<Tx, RT>,
|
||||
std::is_convertible<Ty, RT> >::value >* = 0)
|
||||
: base(CGAL::make_array<RT>(x, y, RT(1))) {}
|
||||
|
||||
VectorH2(const FT& x, const FT& y)
|
||||
|
|
@ -101,12 +99,12 @@ public:
|
|||
Cartesian_const_iterator cartesian_begin() const
|
||||
{
|
||||
return make_cartesian_const_iterator_begin(CGAL::get_pointee_or_identity(base).begin(),
|
||||
boost::prior(CGAL::get_pointee_or_identity(base).end()));
|
||||
std::prev(CGAL::get_pointee_or_identity(base).end()));
|
||||
}
|
||||
|
||||
Cartesian_const_iterator cartesian_end() const
|
||||
{
|
||||
return make_cartesian_const_iterator_end(boost::prior(CGAL::get_pointee_or_identity(base).end()));
|
||||
return make_cartesian_const_iterator_end(std::prev(CGAL::get_pointee_or_identity(base).end()));
|
||||
}
|
||||
|
||||
int dimension() const;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
#include <CGAL/array.h>
|
||||
#include <CGAL/Kernel_d/Cartesian_const_iterator_d.h>
|
||||
|
||||
#include <boost/next_prior.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class R_ >
|
||||
|
|
@ -69,9 +67,9 @@ public:
|
|||
|
||||
template < typename Tx, typename Ty, typename Tz >
|
||||
VectorH3(const Tx & x, const Ty & y, const Tz & z,
|
||||
std::enable_if_t< boost::mpl::and_< boost::mpl::and_< boost::is_convertible<Tx, RT>,
|
||||
boost::is_convertible<Ty, RT> >,
|
||||
boost::is_convertible<Tz, RT> >::value >* = 0)
|
||||
std::enable_if_t< boost::mpl::and_< boost::mpl::and_< std::is_convertible<Tx, RT>,
|
||||
std::is_convertible<Ty, RT> >,
|
||||
std::is_convertible<Tz, RT> >::value >* = 0)
|
||||
: base(CGAL::make_array<RT>(x, y, z, RT(1))) {}
|
||||
|
||||
VectorH3(const FT& x, const FT& y, const FT& z)
|
||||
|
|
@ -117,12 +115,12 @@ public:
|
|||
Cartesian_const_iterator cartesian_begin() const
|
||||
{
|
||||
return make_cartesian_const_iterator_begin(get_pointee_or_identity(base).begin(),
|
||||
boost::prior(get_pointee_or_identity(base).end()));
|
||||
std::prev(get_pointee_or_identity(base).end()));
|
||||
}
|
||||
|
||||
Cartesian_const_iterator cartesian_end() const
|
||||
{
|
||||
return make_cartesian_const_iterator_end(boost::prior(get_pointee_or_identity(base).end()));
|
||||
return make_cartesian_const_iterator_end(std::prev(get_pointee_or_identity(base).end()));
|
||||
}
|
||||
|
||||
int dimension() const { return 3; };
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ public:
|
|||
template < class InputIterator >
|
||||
std::ptrdiff_t insert(InputIterator first, InputIterator last,
|
||||
std::enable_if_t<
|
||||
boost::is_base_of<Point, typename std::iterator_traits<InputIterator>::value_type>::value
|
||||
std::is_base_of<Point, typename std::iterator_traits<InputIterator>::value_type>::value
|
||||
>* = nullptr)
|
||||
#else
|
||||
template < class InputIterator >
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace CGAL {
|
|||
|
||||
class Hyperbolic_data
|
||||
{
|
||||
typedef boost::int8_t Id;
|
||||
typedef std::int8_t Id;
|
||||
|
||||
private:
|
||||
// - 2 for infinite face
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ that do not contain any point of the point set.
|
|||
\cgalHeading{Implementation}
|
||||
|
||||
The algorithm is an implementation of \cgalCite{o-naler-90}. The runtime of an
|
||||
insertion or a removal is \f$ O(\log n)\f$. A query takes \f$ O(n^2)\f$ worst
|
||||
case time and \f$ O(n \log n)\f$ expected time. The working storage is \f$
|
||||
insertion or a removal is \cgalBigO{\log n}. A query takes \cgalBigO{n^2} worst
|
||||
case time and \cgalBigO{n \log n} expected time. The working storage is \f$
|
||||
O(n)\f$.
|
||||
|
||||
*/
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue