updated boost on windows
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// R-tree R*-tree next node choosing algorithm implementation
|
||||
//
|
||||
// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2011-2019 Adam Wulkiewicz, Lodz, Poland.
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/expand.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/algorithms/content.hpp>
|
||||
@@ -48,7 +50,7 @@ public:
|
||||
parameters_type const& parameters,
|
||||
size_t node_relative_level)
|
||||
{
|
||||
::boost::ignore_unused_variable_warning(parameters);
|
||||
::boost::ignore_unused(parameters);
|
||||
|
||||
children_type & children = rtree::elements(n);
|
||||
|
||||
@@ -63,6 +65,20 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
struct child_contents
|
||||
{
|
||||
content_type content_diff;
|
||||
content_type content;
|
||||
size_t i;
|
||||
|
||||
void set(size_t i_, content_type const& content_, content_type const& content_diff_)
|
||||
{
|
||||
i = i_;
|
||||
content = content_;
|
||||
content_diff = content_diff_;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Indexable>
|
||||
static inline size_t choose_by_minimum_overlap_cost(children_type const& children,
|
||||
Indexable const& indexable,
|
||||
@@ -75,10 +91,8 @@ private:
|
||||
size_t choosen_index = 0;
|
||||
|
||||
// create container of children sorted by content enlargement needed to include the new value
|
||||
typedef boost::tuple<size_t, content_type, content_type> child_contents;
|
||||
|
||||
typename rtree::container_from_elements_type<children_type, child_contents>::type children_contents;
|
||||
children_contents.resize(children_count);
|
||||
typename rtree::container_from_elements_type<children_type, child_contents>::type
|
||||
children_contents(children_count);
|
||||
|
||||
for ( size_t i = 0 ; i < children_count ; ++i )
|
||||
{
|
||||
@@ -92,7 +106,7 @@ private:
|
||||
content_type content = index::detail::content(box_exp);
|
||||
content_type content_diff = content - index::detail::content(ch_i.first);
|
||||
|
||||
children_contents[i] = boost::make_tuple(i, content_diff, content);
|
||||
children_contents[i].set(i, content, content_diff);
|
||||
|
||||
if ( content_diff < min_content_diff ||
|
||||
(content_diff == min_content_diff && content < min_content) )
|
||||
@@ -123,10 +137,10 @@ private:
|
||||
return choosen_index;
|
||||
}
|
||||
|
||||
static inline bool content_diff_less(boost::tuple<size_t, content_type, content_type> const& p1, boost::tuple<size_t, content_type, content_type> const& p2)
|
||||
static inline bool content_diff_less(child_contents const& p1, child_contents const& p2)
|
||||
{
|
||||
return boost::get<1>(p1) < boost::get<1>(p2) ||
|
||||
(boost::get<1>(p1) == boost::get<1>(p2) && boost::get<2>(p1) < boost::get<2>(p2));
|
||||
return p1.content_diff < p2.content_diff
|
||||
|| (p1.content_diff == p2.content_diff && (p1.content) < (p2.content));
|
||||
}
|
||||
|
||||
template <typename Indexable, typename ChildrenContents>
|
||||
@@ -146,8 +160,12 @@ private:
|
||||
content_type smallest_content = (std::numeric_limits<content_type>::max)();
|
||||
|
||||
// for each child node
|
||||
for (size_t i = 0 ; i < first_n_children_count ; ++i )
|
||||
for (size_t first_i = 0 ; first_i < first_n_children_count ; ++first_i)
|
||||
{
|
||||
size_t i = children_contents[first_i].i;
|
||||
content_type const& content = children_contents[first_i].content;
|
||||
content_type const& content_diff = children_contents[first_i].content_diff;
|
||||
|
||||
child_type const& ch_i = children[i];
|
||||
|
||||
Box box_exp(ch_i.first);
|
||||
@@ -171,9 +189,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
content_type content = boost::get<2>(children_contents[i]);
|
||||
content_type content_diff = boost::get<1>(children_contents[i]);
|
||||
|
||||
// update result
|
||||
if ( overlap_diff < smallest_overlap_diff ||
|
||||
( overlap_diff == smallest_overlap_diff && ( content_diff < smallest_content_diff ||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_INSERT_HPP
|
||||
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_INSERT_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/algorithms/content.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace index {
|
||||
@@ -123,7 +125,7 @@ public:
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
|
||||
::boost::ignore_unused_variable_warning(parameters);
|
||||
::boost::ignore_unused(parameters);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
|
||||
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/index/detail/algorithms/intersection_content.hpp>
|
||||
#include <boost/geometry/index/detail/algorithms/margin.hpp>
|
||||
#include <boost/geometry/index/detail/algorithms/nth_element.hpp>
|
||||
@@ -158,7 +160,7 @@ struct choose_split_axis_and_index_for_corner
|
||||
}
|
||||
}
|
||||
|
||||
::boost::ignore_unused_variable_warning(parameters);
|
||||
::boost::ignore_unused(parameters);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user