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

@@ -2,8 +2,9 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2016.
// Modifications copyright (c) 2016 Oracle and/or its affiliates.
// This file was modified by Oracle on 2016, 2022.
// Modifications copyright (c) 2016-2022 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -68,7 +69,7 @@ struct segments_intersection_points
Ratio const& rb_from_wrt_a, Ratio const& rb_to_wrt_a)
{
return_type result;
unsigned int index = 0, count_a = 0, count_b = 0;
unsigned int index = 0;
Ratio on_a[2];
// The conditions "index < 2" are necessary for non-robust handling,
@@ -87,7 +88,6 @@ struct segments_intersection_points
result.fractions[index].assign(Ratio::zero(), ra_from_wrt_b);
on_a[index] = Ratio::zero();
index++;
count_a++;
}
if (b1_wrt_a == 2 //rb_from_wrt_a.in_segment()
&& index < 2)
@@ -103,7 +103,6 @@ struct segments_intersection_points
result.fractions[index].assign(rb_from_wrt_a, Ratio::zero());
on_a[index] = rb_from_wrt_a;
index++;
count_b++;
}
if (a2_wrt_b >= 1 && a2_wrt_b <= 3 //ra_to_wrt_b.on_segment()
@@ -116,7 +115,6 @@ struct segments_intersection_points
result.fractions[index].assign(Ratio::one(), ra_to_wrt_b);
on_a[index] = Ratio::one();
index++;
count_a++;
}
if (b2_wrt_a == 2 // rb_to_wrt_a.in_segment()
&& index < 2)
@@ -125,7 +123,6 @@ struct segments_intersection_points
result.fractions[index].assign(rb_to_wrt_a, Ratio::one());
on_a[index] = rb_to_wrt_a;
index++;
count_b++;
}
// TEMPORARY

View File

@@ -0,0 +1,139 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2020 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2020.
// Modifications copyright (c) 2020 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_INTERSECTION_POLICY_HPP
#define BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_INTERSECTION_POLICY_HPP
#include <string>
#include <tuple>
#include <boost/geometry/policies/relate/direction.hpp>
#include <boost/geometry/policies/relate/intersection_points.hpp>
#include <boost/geometry/strategies/side_info.hpp>
namespace boost { namespace geometry
{
namespace policies { namespace relate
{
template <typename IntersectionPointsReturnType>
struct segments_intersection_policy
{
private:
typedef policies::relate::segments_intersection_points
<
IntersectionPointsReturnType
> pts_policy;
typedef policies::relate::segments_direction dir_policy;
public:
struct return_type
{
typedef typename pts_policy::return_type intersection_points_type;
typedef typename dir_policy::return_type direction_type;
return_type(intersection_points_type const& pts_result,
direction_type const& dir_result)
: intersection_points(pts_result)
, direction(dir_result)
{}
intersection_points_type intersection_points;
direction_type direction;
};
template <typename Segment1, typename Segment2, typename SegmentIntersectionInfo>
static inline return_type segments_crosses(side_info const& sides,
SegmentIntersectionInfo const& sinfo,
Segment1 const& s1, Segment2 const& s2)
{
return return_type
(
pts_policy::segments_crosses(sides, sinfo, s1, s2),
dir_policy::segments_crosses(sides, sinfo, s1, s2)
);
}
template <typename Segment1, typename Segment2, typename Ratio>
static inline return_type segments_collinear(
Segment1 const& segment1,
Segment2 const& segment2,
bool opposite,
int pa1, int pa2, int pb1, int pb2,
Ratio const& ra1, Ratio const& ra2,
Ratio const& rb1, Ratio const& rb2)
{
return return_type
(
pts_policy::segments_collinear(segment1, segment2,
opposite,
pa1, pa2, pb1, pb2,
ra1, ra2, rb1, rb2),
dir_policy::segments_collinear(segment1, segment2,
opposite,
pa1, pa2, pb1, pb2,
ra1, ra2, rb1, rb2)
);
}
template <typename Segment>
static inline return_type degenerate(Segment const& segment,
bool a_degenerate)
{
return return_type
(
pts_policy::degenerate(segment, a_degenerate),
dir_policy::degenerate(segment, a_degenerate)
);
}
template <typename Segment, typename Ratio>
static inline return_type one_degenerate(Segment const& segment,
Ratio const& ratio,
bool a_degenerate)
{
return return_type
(
pts_policy::one_degenerate(segment, ratio, a_degenerate),
dir_policy::one_degenerate(segment, ratio, a_degenerate)
);
}
static inline return_type disjoint()
{
return return_type
(
pts_policy::disjoint(),
dir_policy::disjoint()
);
}
static inline return_type error(std::string const& msg)
{
return return_type
(
pts_policy::error(msg),
dir_policy::error(msg)
);
}
};
}} // namespace policies::relate
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_INTERSECTION_POLICY_HPP

View File

@@ -1,116 +0,0 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_TUPLED_HPP
#define BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_TUPLED_HPP
#include <string>
#include <boost/tuple/tuple.hpp>
#include <boost/geometry/strategies/side_info.hpp>
namespace boost { namespace geometry
{
namespace policies { namespace relate
{
// "tupled" to return intersection results together.
// Now with two, with some meta-programming and derivations it can also be three (or more)
template <typename Policy1, typename Policy2>
struct segments_tupled
{
typedef boost::tuple
<
typename Policy1::return_type,
typename Policy2::return_type
> return_type;
template <typename Segment1, typename Segment2, typename SegmentIntersectionInfo>
static inline return_type segments_crosses(side_info const& sides,
SegmentIntersectionInfo const& sinfo,
Segment1 const& s1, Segment2 const& s2)
{
return boost::make_tuple
(
Policy1::segments_crosses(sides, sinfo, s1, s2),
Policy2::segments_crosses(sides, sinfo, s1, s2)
);
}
template <typename Segment1, typename Segment2, typename Ratio>
static inline return_type segments_collinear(
Segment1 const& segment1, Segment2 const& segment2,
bool opposite,
int pa1, int pa2, int pb1, int pb2,
Ratio const& ra1, Ratio const& ra2,
Ratio const& rb1, Ratio const& rb2)
{
return boost::make_tuple
(
Policy1::segments_collinear(segment1, segment2,
opposite,
pa1, pa2, pb1, pb2,
ra1, ra2, rb1, rb2),
Policy2::segments_collinear(segment1, segment2,
opposite,
pa1, pa2, pb1, pb2,
ra1, ra2, rb1, rb2)
);
}
template <typename Segment>
static inline return_type degenerate(Segment const& segment,
bool a_degenerate)
{
return boost::make_tuple
(
Policy1::degenerate(segment, a_degenerate),
Policy2::degenerate(segment, a_degenerate)
);
}
template <typename Segment, typename Ratio>
static inline return_type one_degenerate(Segment const& segment,
Ratio const& ratio,
bool a_degenerate)
{
return boost::make_tuple
(
Policy1::one_degenerate(segment, ratio, a_degenerate),
Policy2::one_degenerate(segment, ratio, a_degenerate)
);
}
static inline return_type disjoint()
{
return boost::make_tuple
(
Policy1::disjoint(),
Policy2::disjoint()
);
}
static inline return_type error(std::string const& msg)
{
return boost::make_tuple
(
Policy1::error(msg),
Policy2::error(msg)
);
}
};
}} // namespace policies::relate
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_TUPLED_HPP