diff options
Diffstat (limited to 'boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp')
-rw-r--r-- | boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp b/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp index c4e44cae18..97553f7c32 100644 --- a/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp +++ b/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp @@ -4,6 +4,10 @@ // // Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland. // +// This file was modified by Oracle on 2021. +// Modifications copyright (c) 2021 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) @@ -11,6 +15,9 @@ #ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_COMPARABLE_DISTANCE_CENTROID_HPP #define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_COMPARABLE_DISTANCE_CENTROID_HPP +#include <boost/geometry/algorithms/detail/comparable_distance/interface.hpp> +#include <boost/geometry/core/access.hpp> + #include <boost/geometry/index/detail/algorithms/sum_for_indexable.hpp> #include <boost/geometry/index/detail/algorithms/diff_abs.hpp> @@ -48,7 +55,7 @@ struct sum_for_indexable_dimension<Point, BoxIndexable, box_tag, comparable_dist point_coord_t pt_c = geometry::get<DimensionIndex>(pt); indexable_coord_t ind_c_min = geometry::get<geometry::min_corner, DimensionIndex>(i); indexable_coord_t ind_c_max = geometry::get<geometry::max_corner, DimensionIndex>(i); - + indexable_coord_t ind_c_avg = ind_c_min + (ind_c_max - ind_c_min) / 2; // TODO: awulkiew - is (ind_c_min + ind_c_max) / 2 safe? |