update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -92,7 +92,7 @@ public:
typename RangeIterator,
typename Strategy,
typename Distance
>
>
static inline RangeIterator apply(Geometry const& geometry,
RangeIterator first,
RangeIterator last,
@@ -111,7 +111,7 @@ public:
typename Geometry,
typename RangeIterator,
typename Strategy
>
>
static inline RangeIterator apply(Geometry const& geometry,
RangeIterator first,
RangeIterator last,

View File

@@ -1,8 +1,8 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014, Oracle and/or its affiliates.
// Copyright (c) 2014-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
@@ -12,7 +12,9 @@
#include <utility>
#include <boost/range.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size.hpp>
#include <boost/geometry/core/assert.hpp>
#include <boost/geometry/core/closure.hpp>
@@ -34,15 +36,14 @@ template
<
typename Point,
typename Range,
closure_selector Closure,
typename Strategy
closure_selector Closure
>
class point_to_point_range
{
protected:
typedef typename boost::range_iterator<Range const>::type iterator_type;
template <typename Distance>
template <typename Strategy, typename Distance>
static inline void apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -71,8 +72,11 @@ protected:
// check if other segments are closer
for (++prev, ++it; it != last; ++prev, ++it)
{
Distance dist = strategy.apply(point, *prev, *it);
if (geometry::math::equals(dist, zero))
Distance const dist = strategy.apply(point, *prev, *it);
// Stop only if we find exactly zero distance
// otherwise it may stop at some very small value and miss the min
if (dist == zero)
{
dist_min = zero;
it_min1 = prev;
@@ -93,7 +97,7 @@ protected:
public:
typedef typename std::pair<iterator_type, iterator_type> return_type;
template <typename Distance>
template <typename Strategy, typename Distance>
static inline return_type apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -106,6 +110,7 @@ public:
return std::make_pair(it_min1, it_min2);
}
template <typename Strategy>
static inline return_type apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -121,7 +126,7 @@ public:
return apply(point, first, last, strategy, dist_min);
}
template <typename Distance>
template <typename Strategy, typename Distance>
static inline return_type apply(Point const& point,
Range const& range,
Strategy const& strategy,
@@ -134,6 +139,7 @@ public:
dist_min);
}
template <typename Strategy>
static inline return_type apply(Point const& point,
Range const& range,
Strategy const& strategy)
@@ -145,15 +151,15 @@ public:
// specialization for open ranges
template <typename Point, typename Range, typename Strategy>
class point_to_point_range<Point, Range, open, Strategy>
: point_to_point_range<Point, Range, closed, Strategy>
template <typename Point, typename Range>
class point_to_point_range<Point, Range, open>
: point_to_point_range<Point, Range, closed>
{
private:
typedef point_to_point_range<Point, Range, closed, Strategy> base_type;
typedef point_to_point_range<Point, Range, closed> base_type;
typedef typename base_type::iterator_type iterator_type;
template <typename Distance>
template <typename Strategy, typename Distance>
static inline void apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -183,12 +189,12 @@ private:
it_min1 = it_back;
it_min2 = first;
}
}
}
public:
typedef typename std::pair<iterator_type, iterator_type> return_type;
template <typename Distance>
template <typename Strategy, typename Distance>
static inline return_type apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -202,6 +208,7 @@ public:
return std::make_pair(it_min1, it_min2);
}
template <typename Strategy>
static inline return_type apply(Point const& point,
iterator_type first,
iterator_type last,
@@ -219,7 +226,7 @@ public:
return apply(point, first, last, strategy, dist_min);
}
template <typename Distance>
template <typename Strategy, typename Distance>
static inline return_type apply(Point const& point,
Range const& range,
Strategy const& strategy,
@@ -232,6 +239,7 @@ public:
dist_min);
}
template <typename Strategy>
static inline return_type apply(Point const& point,
Range const& range,
Strategy const& strategy)

View File

@@ -1,8 +1,9 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014, Oracle and/or its affiliates.
// Copyright (c) 2014, 2019, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
@@ -40,7 +41,7 @@ private:
<
typename RTreeRangeIterator,
typename QueryRangeIterator,
typename Strategy,
typename Strategies,
typename RTreeValueType,
typename Distance
>
@@ -48,12 +49,16 @@ private:
RTreeRangeIterator rtree_last,
QueryRangeIterator queries_first,
QueryRangeIterator queries_last,
Strategy const& strategy,
Strategies const& strategies,
RTreeValueType& rtree_min,
QueryRangeIterator& qit_min,
Distance& dist_min)
{
typedef index::rtree<RTreeValueType, index::linear<8> > rtree_type;
typedef index::parameters
<
index::linear<8>, Strategies
> index_parameters_type;
typedef index::rtree<RTreeValueType, index_parameters_type> rtree_type;
BOOST_GEOMETRY_ASSERT( rtree_first != rtree_last );
BOOST_GEOMETRY_ASSERT( queries_first != queries_last );
@@ -62,7 +67,8 @@ private:
dist_min = zero;
// create -- packing algorithm
rtree_type rt(rtree_first, rtree_last);
rtree_type rt(rtree_first, rtree_last,
index_parameters_type(index::linear<8>(), strategies));
RTreeValueType t_v;
bool first = true;
@@ -88,8 +94,8 @@ private:
<
QueryRangeIterator
>::value_type,
Strategy
>::apply(t_v, *qit, strategy);
Strategies
>::apply(t_v, *qit, strategies);
if (first || dist < dist_min)
{
@@ -144,7 +150,7 @@ public:
apply(rtree_first, rtree_last, queries_first, queries_last,
strategy, rtree_min, qit_min, dist_min);
return std::make_pair(rtree_min, qit_min);
return std::make_pair(rtree_min, qit_min);
}