Skip to content

Commit

Permalink
Merge branch 'master' into CGAL-add_missing_test
Browse files Browse the repository at this point in the history
# Conflicts:
#	STL_Extension/test/STL_Extension/test_skiplist.cpp
  • Loading branch information
lrineau committed Jul 12, 2023
2 parents b9d098c + 40eccb8 commit d10e938
Show file tree
Hide file tree
Showing 356 changed files with 6,454 additions and 2,418 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions AABB_tree/include/CGAL/AABB_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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&& ...);
Expand Down Expand Up @@ -326,7 +325,7 @@ namespace CGAL {
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

Expand All @@ -351,7 +350,7 @@ namespace CGAL {
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
///@}
Expand Down
1 change: 0 additions & 1 deletion AABB_tree/test/AABB_tree/aabb_test_multi_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 1 addition & 2 deletions AABB_tree/test/AABB_tree/aabb_test_ray_intersection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <iterator>

#include <boost/functional/value_factory.hpp>
#include <boost/array.hpp>

#include <CGAL/assertions.h>
#include <CGAL/algorithm.h>
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -674,12 +672,9 @@ class Test_root {
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 ) );
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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 >,
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{ };
Expand Down
2 changes: 1 addition & 1 deletion Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{ };
Expand Down
3 changes: 1 addition & 2 deletions Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -255,7 +254,7 @@ class Fixed_alpha_shape_3 : public Dt
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1343,6 +1343,7 @@ class Alpha_wrap_3
return true;
}

public:
// Not the best complexity, but it's very cheap compared to the rest of the algorithm.
void make_manifold()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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{&nbsp;} 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit d10e938

Please sign in to comment.