update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -3,10 +3,10 @@
// Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2013-2017 Adam Wulkiewicz, Lodz, Poland.
// This file was modified by Oracle on 2014.
// Modifications copyright (c) 2014 Oracle and/or its affiliates.
// This file was modified by Oracle on 2014, 2017.
// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -31,8 +31,10 @@
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/algorithms/detail/extreme_points.hpp>
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
#include <boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp>
#include <boost/geometry/strategies/side.hpp>
namespace boost { namespace geometry
@@ -153,7 +155,6 @@ inline void calculate_average(Point& point, std::vector<P> const& points)
{
typedef typename geometry::coordinate_type<Point>::type coordinate_type;
typedef typename std::vector<P>::const_iterator iterator_type;
typedef typename std::vector<P>::size_type size_type;
coordinate_type x = 0;
coordinate_type y = 0;
@@ -165,7 +166,7 @@ inline void calculate_average(Point& point, std::vector<P> const& points)
y += geometry::get<1>(*it);
}
size_type const count = points.size();
signed_size_type const count = points.size();
geometry::set<0>(point, x / count);
geometry::set<1>(point, y / count);
}
@@ -241,8 +242,9 @@ inline void replace_extremes_for_self_tangencies(Extremes& extremes, Intruders&
extremes = triangle;
}
template <int Dimension, typename Geometry, typename Point>
inline bool calculate_point_on_surface(Geometry const& geometry, Point& point)
template <int Dimension, typename Geometry, typename Point, typename SideStrategy>
inline bool calculate_point_on_surface(Geometry const& geometry, Point& point,
SideStrategy const& strategy)
{
typedef typename geometry::point_type<Geometry>::type point_type;
typedef typename geometry::coordinate_type<Geometry>::type coordinate_type;
@@ -250,7 +252,7 @@ inline bool calculate_point_on_surface(Geometry const& geometry, Point& point)
typedef std::vector<std::vector<point_type> > intruders_type;
intruders_type intruders;
geometry::extreme_points<Dimension>(geometry, extremes, intruders);
geometry::extreme_points<Dimension>(geometry, extremes, intruders, strategy);
if (extremes.size() < 3)
{
@@ -291,21 +293,57 @@ inline bool calculate_point_on_surface(Geometry const& geometry, Point& point)
\tparam Geometry geometry type. This also defines the type of the output point
\param geometry Geometry to take point from
\param point Point to assign
\param strategy side strategy
*/
template <typename Geometry, typename Point>
inline void point_on_surface(Geometry const& geometry, Point & point)
template <typename Geometry, typename Point, typename SideStrategy>
inline void point_on_surface(Geometry const& geometry, Point & point,
SideStrategy const& strategy)
{
concepts::check<Point>();
concepts::check<Geometry const>();
// First try in Y-direction (which should always succeed for valid polygons)
if (! detail::point_on_surface::calculate_point_on_surface<1>(geometry, point))
if (! detail::point_on_surface::calculate_point_on_surface<1>(geometry, point, strategy))
{
// For invalid polygons, we might try X-direction
detail::point_on_surface::calculate_point_on_surface<0>(geometry, point);
detail::point_on_surface::calculate_point_on_surface<0>(geometry, point, strategy);
}
}
/*!
\brief Assigns a Point guaranteed to lie on the surface of the Geometry
\tparam Geometry geometry type. This also defines the type of the output point
\param geometry Geometry to take point from
\param point Point to assign
*/
template <typename Geometry, typename Point>
inline void point_on_surface(Geometry const& geometry, Point & point)
{
typedef typename strategy::side::services::default_strategy
<
typename cs_tag<Geometry>::type
>::type strategy_type;
point_on_surface(geometry, point, strategy_type());
}
/*!
\brief Returns point guaranteed to lie on the surface of the Geometry
\tparam Geometry geometry type. This also defines the type of the output point
\param geometry Geometry to take point from
\param strategy side strategy
\return The Point guaranteed to lie on the surface of the Geometry
*/
template<typename Geometry, typename SideStrategy>
inline typename geometry::point_type<Geometry>::type
return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy)
{
typename geometry::point_type<Geometry>::type result;
geometry::point_on_surface(geometry, result, strategy);
return result;
}
/*!
\brief Returns point guaranteed to lie on the surface of the Geometry
\tparam Geometry geometry type. This also defines the type of the output point